The 33-year-old American announced on Monday that this tournament would be his last, but it looked like his stay at Flushing Meadows would be extended when he took a two-set lead over qualifier Ivo Karlovic.
But the 6ft 10in Croatian fought back to level and, as the clock passed midnight, clinched a 6-7 (2/7) 3-6 6-4 7-6 (7/2) 7-6 (7/2) victory on a deciding tie-break.
It was the end of the road for James Blake, who reached number four in the world in 2006, said: "It's not ideal. I'm trying to have some perspective immediately after and think about the fact that it is just one match and it won't be the defining moment of my career luckily.
"It's not a fun way to do it, but only one guy's holding the trophy at the end of this two weeks. I wished it was me. I did everything to prepare as if it could be me. It's not.
"I'm never going to have 15,000, 20,000 people cheering for me, chanting USA, screaming my name, that kind of stuff.
"I'm lucky enough to have had that for 14 years. I try to look at the positives. Most people never have had that. Most people in the world will never be able to relate to that.
"I'm looking forward to a new stage in my life. I'll miss this one. I could have finished this year a little better, this tournament, but to expect to win more matches in my mind would just be greedy."
Sixth seed Del Potro is seen by many as possibly the only man who can challenge Novak Djokovic, Rafael Nadal and Andy Murray for the title, but he was given a fright by world number 74 Garcia-Lopez.
It was a high-quality match full of ferocious hitting, and in the end 2009 winner Del Potro came through 6-3 6-7 (5/7) 6-4 7-6 (9/7) after four hours and 13 minutes of play, plus a lengthy rain break.
The Argentinian, who pushed Djokovic to five sets in a remarkable Wimbledon semi-final last month, roared with relief at the end after fighting back from a break down in the fourth set.
He said: "I felt good because I won a big battle for the first round.
"Of course, he's a very tough opponent. He played so solid on the baseline. We played every time long rallies. I had to make three or four winners in the same point to win the point.
"But it was really close for me. I think I was lucky maybe in the fourth set when I come back after being a break down. But I'm okay. I feel good with my level. My forehand was good. My serve improved since the last tournament. That's important."
There was plenty of needle during the match, with Del Potro unhappy at the number of times Garcia-Lopez received visits from the trainer.
But the sixth seed played down the spat, saying: "I just asked about the medical timeout because I didn't know how many or how long. He explained to me then the chair umpire also, and that's it."
Next up for Del Potro is another potentially tricky match against former champion Lleyton Hewitt, who saw off American Brian Baker 6-3 4-6 6-3 6-4 in a match that featured 17 breaks of serve, while ninth seed Stanislas Wawrinka beat Radek Stepanek in straight sets.
Roger Federer and Rafael Nadal both play their second-round matches on Thursday, with Federer taking on Argentina's Carlos Berlocq while Nadal plays Rogerio Dutra Silva of Brazil in the night session.