The 28th-seeded Sock was three games from winning the match in the third set against Ruben Bemelmans on a hot, humid afternoon Wednesday in New York. He received treatment after dropping the set, but in the third game of the fourth, he froze in place after a serve, unable to move his leg.
A trainer had to help him sit down on the court, and Sock was barely able to lift his arm to shake Bemelmans' hand when the Belgian walked around the net and over to him.
Trainers rubbed bags of ice on Sock's legs and neck. A wheelchair was brought out, but he was able to limp off with significant help.
It had been a breakthrough season for the 22-year-old Sock, who made his deepest run at a major by reaching the fourth round at the French Open and climbed to a career best in the rankings.
The 107th-ranked Bemelmans advances to a Grand Slam third round for the first time.