Alcaraz had just won an electrifying second set to level the hugely anticipated match and looked like he might be grabbing the ascendancy when, after hitting a forehand, his right leg seized up.
The 20-year-old initially appeared unable to move but eventually limped back to his seat and was forced to forfeit a service game in order to have treatment.
The crowd loudly jeered when they realised the game had been awarded to Djokovic but that was the least of Alcaraz’s troubles, with the Spaniard, who had been wowing Philippe Chatrier with his incredible movement and dynamism, reduced to little more than walking.
He opted not to retire but could offer little challenge to Djokovic thereafter and won only one more game, with the Serbian completing a 6-3 5-7 6-1 6-1 victory to move through to his seventh final on the Parisian clay.
Djokovic, who has not lost a grand slam match since the quarter-finals here last year, said: “First and foremost I have to say tough luck for Carlos. At this level, the last thing you want is cramps. I feel for him, I feel sorry and hope he can recover and come back very soon.
“I told him at the net, he knows how young he is. He’s going to win this tournament I’m sure many, many times. He’s an incredible player. It’s tough obviously for him to not know whether he should finish the match but congratulations to him for the fighting spirit.
“Towards the end of the second set I wasn’t feeling fresh at all. We went toe to toe and then this thing happened. I just tried to stay focused. I saw that he’s struggling but I didn’t want to think too much what’s going on on the other side of the net.
“I’m incredibly proud to reach another final.”
It was a huge disappointment because the contest had been living up to the massive hype, with the pair meeting for the first time in a grand slam and only the second occasion.
The 16-year age gap was the biggest in any Roland Garros semi-final in the open era and it seemed a pivotal match in the generational battle going on in men’s tennis as well as for Djokovic’s hopes of pulling away from his rivals at the top of the all-time lists.
Now he will be an overwhelming favourite to become the first man to win 23 grand slam singles titles in the final on Sunday, when he can also reclaim the number one ranking.
The 36-year-old had been tested on his way to the last four but he stepped up his level significantly in the first set, breaking Alcaraz in the fourth game and proving the steadier in tricky, breezy conditions.
The match really came alive in the third game of the second set when Alcaraz, whose ability to have fun at what should be stressful moments is a key part of his appeal, hit one of the most outrageous shots seen at a grand slam.
Having been dragged short and wide by a Djokovic drop shot, the Serbian appeared to have dinked a winner into the open court but Alcaraz had other ideas, not just getting to the ball on the slide but, while still travelling in the wrong direction, twisting and flicking a forehand inside the sideline.
Djokovic could do nothing but laugh and applaud while Alcaraz soaked up the adulation.
It was Djokovic who called the trainer after the seventh game for treatment to his right forearm and Alcaraz finally clinched his sixth break point to move 5-3 ahead.
The young Spaniard was forcing the pace and beginning to have significant success with his signature drop shot, but Djokovic is the toughest of grand slam beasts and back he came with a backhand winner drilled down the line.
Alcaraz forced three set points in the next game but Djokovic saved all of them, and he might have claimed the set had he taken a break point in the next game but uncharacteristically dumped a routine backhand wide.
Alcaraz held and then went up 0-40 again, this time drawing the error from Djokovic as he levelled the match.
At that stage it appeared the contest had a long distance still to run but a few minutes later it was effectively over.
Alcaraz hobbled his way through the remainder of the third set in what seemed like a futile bid to keep going and then took a long bathroom break, giving himself all the time he could to somehow recover.
He certainly moved better at the start of the fourth set but not nearly well enough and Djokovic ensured he did not find a way back into the match, not losing another game until he was 5-0 up.