Murray seeded eighth, won 6-3 7-6 (8-6) 1-6 7-5 in three hours and eight minutes inside a sweltering Louis Armstrong Stadium.
He made his way through the first two sets in comfortable fashion but began to feel the strain when Haase won nine straight games in the third and fourth sets.
Haase, the world number 70, had looked capable of handing the Scot his first opening-round defeat at a Grand Slam since 2008 when he won nine straight games.
But despite cramping, and choosing not to sit down at the changeovers, Murray twice recovered from a break down in a wildly unpredictable fourth set that saw both men ailing in the New York heat.
“I started cramping at the beginning of the third set, at the front of my quad and then in my forearm,” said Murray.
“It was not particularly comfortable and I just tried to hang around as long as possible and managed to get through.
“I was in a good position at 2-0 up but I didn’t know whether to go for it at the beginning of the third set or conserve energy and go for it in the fourth.
“It wasn’t easy for Robin either.”
Murray had come back from two sets down to beat Haase at Flushing Meadows in 2011, a year after he had lost to Stan Wawrinka on the same court in what was his last Grand-Slam defeat before the quarter-final stage.
The Scot goes on to face German qualifier, Matthias Bachinger, who beat Radek Stepanek 6-3 6-2 6-2.
In the women singles, second seed, Simona Halep, had to come back from a set down to defeat Danielle Collins 6-7 (2-7) 6-1 6-2 in the first round of the US Open.
Collins threatened to cause a major upset at Arthur Ashe Stadium when she dominated the opening-set tie-break against the French Open finalist.
But Halep, who served seven double faults, managed to turn things around and win the next two sets comfortably to set up a second-round meeting with Jana Cepelova, who defeated Maria Teresa Torro Flor 2-6 7-5 6-1.
Sixth seed, Angelique Kerber, was also pushed to three sets before coming through to clinch a 6-2 3-6 7-5 win against Ksenia Pervak, who may have closed out the upset if not for her 56 unforced errors.
Agnieszka Radwanska, who is seeded 4th had a much easier route through to round two as she thrashed Sharon Fichman 6-1 6-0 in just 47 minutes.