Djokovic advanced with a 6-0 6-3 victory over Italy's Lorenzo Musetti, conqueror of Casper Ruud in the previous round.
Musetti had no answer for Djokovic's forehand during the match, resulting in winner after winner for the Serbian.
Djokovic, who has claimed this title on six occasions, will now face Stefanos Tsitsipas in the last four.
Tsitsipas booked his semi-final spot with a 6-2 6-4 win over Tommy Paul.
Earlier, Alcaraz, after having treatment on an abdominal muscle, retired during his second-set tie-break against fellow 19-year-old Holger Rune, who was 3-1 up and had won the first set 6-3.
Alcaraz wrote on Twitter: "Holger was better today and deserved to win! It was difficult to withdraw, but I was scared of making it worse. Health comes first!"
Rune said: "I thought it was a great match. [It's] unlucky for him. I think we both played very well and I was super focused. It was an amazing crowd, amazing tennis, so I'm super pleased with how I handled everything today."
"Carlos is, if not the best, one of the best return players in the world," he added. "Of course, he is No. 1, so he is obviously the best in the world right now, but I'm super happy with how I handled all the things under pressure and how I handled also my return game. I tried to play as aggressive as possible. Sometimes I missed a few shots but it was all worth it because at the end I was very good at important moments."
Rune's opponent in the semis is Felix Auger-Aliassime, who advanced after a 6-1 6-4 victory over Frances Tiafoe.
"Of course a few times the luck was on my side, but I feel like also I played a great match," said Auger-Aliassime, who struck 26 winners to Tiafoe's 14. "We've played a few times. In New York [in 2021] it was tight sets, we played in Barcelona this year also, two not easy sets. To come out and play the way I did in the first set, 6-1, it was great.