The world number one defeated Czech seventh seed Tomas Berdych 6-3, 7-5, 6-3, claiming a place in an eighth Roland Garros semi-final and sixth in succession.
But the 29-year-old Serb, who will face Dominic Thiem of Austria for a place in the final, came perilously close to being kicked out of the tournament in the second game of the third set.
Frustrated at missing a break point, the Serb went to smash his racquet into the ground but it slipped out of his grasp before it flew into the backwall on Philippe Chatrier Court.
Not surprisingly, he offered a speedy apology for his actions to chair umpire Eva Asderaki Moore and escaped with a warning for racquet abuse.
More From This Section
"I was lucky there," admitted Djokovic. "I apologized to the people that have been in this particular situation with me and that could have been hurt by my racquet.
"But, you know, it was never the intention. It was just some unfortunate bounce, but fortunate ending of that scenario. That's all I can say."
Djokovic is a three-time runner-up in Paris and is bidding to become just the eighth man to win all four majors.
But it didn't stop the Serb from claiming a 24th win in 26 meetings against Berdych and his 11th in a row.
Berdych broke for the first time to get to 3-4 but
Djokovic restored his advantage in the 12th game for a two sets lead.
The two men exchanged breaks in the first two games of the third before Berdych became angry over the deteriorating wet conditions.
"It's a circus, just one big circus," he fumed at tournament referee Wayne McKewen who took the players off for a brief stoppage to allow the rain to pass.
Djokovic was playing for the third day in succession after a washout on Monday and just two hours of action on Tuesday.
If he is to win an elusive French Open title, the top seed, who is also the Wimbledon, US and Australian Open champion, will have to play five days in six although he will start against Thiem as the favourite having won both their previous matches.
Friday's other semi-final will see second seed Andy Murray take on Swiss third seed and defending champion Stan Wawrinka.