The top-ranked Serb struggled to control his errors -- and his emotions -- and was upset in the semifinals by Spain's Roberto Bautista Agut6-4, 6-4.
Andy Murray had his own anger issues in the other semifinal against Gilles Simon, but the second-seeded Scot regained his composure and pulled out a 6-4, 6-3 victory to advance to his 10th final of the year.
Djokovic, a three-time champion in Shanghai, was noticeably off his game for the second straight day after laboring to victory over German qualifier Mischa Zverev in the quarterfinals. Djokovic sprayed his groundstrokes and missed routine volleys, finishing with 29 unforced errors.
He was also a miserable 2-of-9 on break-point chances.
Against Zverev, Djokovic tried to stay calm by shrugging off errors and even humming a song to keep his anger from boiling over.
That attitude was nowhere to be seen on Saturday, however.
Djokovic smashed his racket into bits after losing the first set -- later grabbing a towel from a ball girl to sweep up the pieces -- and ripped his shirt open in anger during another point.
He argued repeatedly with chair umpire Carlos Bernardes over line calls and a time violation he received for changing his ripped shirt. He continued the exchange after the match and complained about it in his postmatch news conference.
"[Bernardes] was the star of the show," Djokovic said. "That's what he wanted to be today."
Djokovic has talked repeatedly this week about trying to lessen the pressure he feels on court and rediscover his inner joy for the game after a couple of all-conquering years that have left him mentally exhausted. He acknowledged after Saturday's defeat that it's very much a work in progress.
"This is one of those days," Djokovic said. "Things go in an opposite direction than you want them, but again, it's a lesson. Every day is a lesson."
It has been a season full of them for a player not accustomed to struggling. There has been a stunning loss to Sam Querrey at Wimbledon, an early exit at the Rio de Janeiro Olympics to Juan Martin del Potroanda demoralizing defeat in the US Open final to Stan Wawrinka.
Djokovic lost for the seventh time this season. Of those, five have come against players ranked outside the top 15, according to ESPN Stats & Information.
There have also been injuries to his elbow and wrist, yet another unfamiliar issue for the normally healthy Djokovic.
But the Serb doesn't believe these challenges are insurmountable. Or that they will lead to a deeper slide.
"I had to experience sooner or later this," he said. "I knew I could not go on playing the highest level for so many years all the time, but it's good to experience this so I can hopefully get better in the period to come."
Murray can empathize with what Djokovic is going through. And he is certain his rival will find a way to turn it around.
"I do think that after everything he's achieved and the kind of dominance that he's had, it takes so much effort and work to be making finals almost every single week for two years," Murray said. "It's maybe normal if he's mentally a little tired or trying to find the next thing for him to achieve after what he did at the French Open."
Murray struggled himself against Simon, dropping serve three times in the first set. He also griped repeatedly to the umpire about missed calls.
But he put distractions to the side and managed to break Simon six times to clinch the match in straight sets.
Murray hasn't dropped a set in his last 10 matches. He is also 2-0 against Bautista Agut.
Compared to some of his clay-loving Spanish compatriots, though, Bautista Agut is no slouch on hard courts. In fact, he has more victories on hard courts this year (37) than Murray (34), though Bautista Agut has played in more tournaments.
"I think because of his game style, he hits the ball very flat on both sides," Murray said. "That's not typical for a Spaniard. I think that helps him."
The Associated Press contributed to this report.
Djokovic's racket rage
Novak Djokovic, losing to Roberto Bautista Agut in the semifinals at the Shanghai Masters, takes out his frustrations on his racket.