Karlovic beat Djokovic when they last met in 2008, also the year of his only previous win over a world No. 1, Roger Federer in Cincinnati.
"He served very well," Djokovic said. "But you could expect that. I was coming into the match knowing that I will have very, very few chances. But I was hoping that these conditions and the wind will kind of give me some second-serve opportunities."
Despite the swirling wind, Karlovic's serve was stellar again, a 73 per cent first-serve percentage.
In the third set, in which he served two aces and two service winners in the final game, Karlovic was even better on first serve, at 85 per cent.
Djokovic's irritation at his inability to break Karlovic, boosted the lanky Croat.
"I looked at him when he threw the racket and when he smashed the ball, so I knew that he was a little bit frustrated," Karlovic said. "So I was just trying to stay calm."
He never offered Djokovic a break-point opportunity in the 2-hour, 15-minute match, and took advantage of a second break point in the seventh game of the third set with a perfect forehand pass.
"In these particular matches, one ball can decide a winner, and that was the case," Djokovic said. "Just played a little bit too defensive in that game. I just, instead of kind of going through the ball, just sent the ball back."
Karlovic added 21 aces to his resume for a career total of 9,062. This week, he joined Goran Ivanisevic (10,183) and Andy Roddick (9,074) as the only players since 1991 to serve more than 9,000 aces
"Maybe the next match," Karlovic said of being only 13 aces from passing Roddick.
The day didn't improve for Djokovic, who with Serbian partner Filip Krajinovic fell in doubles 7-6 (3), 6-1 to Rafael Nadal and Juan Monaco of Argentina.
Djokovic and Krajinovic blew a 5-2 lead in the first set.
In the semifinals, Karlovic will play David Ferrer, who beat Dustin Brown of Germany 6-2, 6-2. Brown gifted 61 unforced errors.
In the other semifinal, third-seeded Tomas Berdych will meet Andreas Seppi of Italy or Ivan Dodig of Croatia. Berdych put down sixth-seeded Richard Gasquet of France 6-2, 6-1 in the quarterfinals.