The Brazilian forward, who was mourning the death of his bodyguard, was replaced by Brahim Diaz in the 68th minute with the score at 2-0.
Madrid had taken the lead through a Matias Dituro own goal and a Kylian Mbappe strike, only for Elche to fight back and level through Abiel Osorio and Fer Nino.
Substitute Carlos Espi then scored a 91st-minute winner to secure the points.
Mourinho praised Vinicius’ contribution despite the early withdrawal.
“Vinicius Jr did a great job defensively; he helped us a lot,” the Real Madrid manager said.
“He was very tired at the end, that’s why I subbed him out.”
The Portuguese coach also noted that he made changes while the score was still 2-0 because he sensed his side were beginning to lose control of the game.
Fresh legs in attack, including the introduction of Jude Bellingham and Espi, ultimately proved decisive.
Vinicius has endured a mixed start to the season under Mourinho, with just one goal and two assists in 7 games, but the winger remains a vital part of the Los Blancos' attack, especially after signing a mammoth new 6-year deal.