Murray defeated the 70th-ranked Dutchman 6-3, 7-6 (8/6), 1-6, 7-5, but was at a loss to explain the painful cramp that struck without warning -- and could have cost him the match.
"I could have easily lost that match," said Murray, who thought he'd have been in real trouble in a fifth set. "I was very close to losing the match."
The Scot, who hasn't reached a final since lifting the Wimbledon trophy in 2013, staggered through the third set, and twice rallied from a break down in the fourth to finally close it out after just over three hours.
But the match against Haase left him looking for answers.
Also Read
"The conditions in Miami were significantly hotter and more humid than it was out there today," he said. "And at the time it happened I wasn't exhausted. It just happened."
In the end, however, he was safely through, gaining the decisive break in the 11th game of the fourth set then saving three break points in the following game before closing out the match.
Top-seeded Djokovic, recently married and soon to be a father for the first time, is gunning for a fifth straight US Open finals appearance and a second title to add to the one he won in 2011.