Sharapova was beaten 6-3 3-6 6-4 in the biggest upset of the tournament so far before Murray clawed his way back to defeat Haase 6-7 2-6 6-2 6-0 6-4 in the second round and avoid another early exit at the last grand slam of the year.
"You're relieved to get through a long one like that, especially when you're behind," said fourth-seeded Murray.
"I'm just glad I'm in the next round and get a chance to improve and play better and give myself a chance."
Defending champion Rafa Nadal strolled through to the third round when his opponent, Frenchman Nicolas Mahut, retired in the first game of the third set with the Spaniard well in control, leading 6-2 6-2.
Image: Rafael Nadal of Spain serves to Nicolas Mahut of France during the U.S. Open tennis tournament in New York, Friday, Sept. 2, 2011