The Scot was pushed hard by the Argentine but managed to progress 7-5 6-1 3-6 6-1 in two hours and 44 minutes in the New York heat.
"I started to move a lot better towards the end of the match," he told Sky Sports News. "I riled myself up, but it is pretty draining conditions on this court where there is absolutely no shade."
The reigning champion will continue the defence of his crown against Florian Mayer on Sunday and he is expecting a tough battle against the 29-year-old German.
"Florian Mayer has got a strange game he doesn't play like anyone else on tour," said Murray. "There will be some funky points and I have to be ready for that."
Mayer defeated Donald Young 7-5 6-3 6-4 to book his place in the third round at Flushing Meadows.