Djokovic, the defending champion, was completely outplayed by his German opponent in a 6-2 6-4 loss.
Haas ended the Serb's 14-match winning streak at the tournament and inflicted only his second defeat of the season.
"As far as I'm concerned, it's definitely the worst match I have played in a long time," said Djokovic.
"It was quite cold and there was basically no air in the balls and a low bounce, which is more suitable to his style of the game.
"I needed to make much less unforced errors in order to win against a quality player like Tommy and I congratulate him.
"Definitely he made great tactics, used the serve well, moved around the court really well and was better."
From 2-1 down in the first set, Haas, 34, won seven straight games to put himself on course for a fine win at 6-2 2-0 up.
Haas's victory was his first against a world number one since 1999.
The 15th seed's prize is a last-eight meeting with 11th seed Gilles Simon of France, who beat Serbia's Janko Tipsarevic in three sets.
Murray overcame Italy's Andreas Seppi 6-2 6-4 and next plays Croatia's Marin Cilic, the world number 11. He will overtake Roger Federer as world number two if he wins the tournament.
/BBC/