The former No. 1, whose lone major singles win came at the 2003 U.S. Open, was trailing Lleyton Hewitt 3-6, 6-3, 6-4 when he called the trainer to his courtside chair. He then walked over to Hewitt and shook the Australian player's hand.
Roddick had fallen to the court in the second set, but played despite being in obvious pain from the leg injury.
"It's a miserable, terrible thing being out there compromised like that," Roddick said of his attempt to play with the injury. "I wanted to see what I could do. You don't really have much time for clarity in that situation. He's a tough guy to play ... he knew what was going on."
Trailing 2-0 in the second set, Roddick moved suddenly to his right to retrieve a Hewitt forehand, and seemed to overstretch his right leg, rolling over on his right ankle. Hewitt won that point and the next two for a 3-0 lead, then Roddick took a medical timeout.
Hewitt said the injury was "a nightmare for both of us."
"Obviously, he stretched something," Hewitt said. "It's not easy for the person up the other end of the court. It's hard to concentrate when they're having injury timeouts.
"Andy's a great competitor ... he's similar to me. He plays with his heart on his sleeve, has that never-say-die attitude as well. It's never easy to play injured or to pull out of a match. It's not a good feeling."
Roddick looked lethargic in the second and third sets, rarely chasing down shots and walking slowly between points with his head hanging down. He threw his racket into the wall at one point and argued with the chair umpire after a video replay showed that one of Hewitt's shots — originally called out — actually hit the line.
The 30-year-old Hewitt, who has won two major titles and was a finalist here in 2005, will play 21-year-old Milos Raonic of Thornhill, Ont., in the third round.
Top-seeded Novak Djokovic advanced earlier Thursday, overcoming an early service break against Santiago Giraldo in a 6-3, 6-2, 6-1 victory at Melbourne Park.
"I maybe started a little too defensive because he was hitting the ball very strong," said Djokovic, who won three of the four majors last year. "But then after, it was the other way around."
A title in Melbourne would put him in select company. Only four players — Laver, Pete Sampras, Roger Federer and Rafael Nadal — have won three straight Grand Slam singles tournaments, and Djokovic could join them following his wins at last year's Wimbledon and U.S. Open.
Second-seeded Nadal and third-seeded Federer, who are in the other half of the draw here, play back-to-back matches at Rod Laver Arena on Friday.
Earlier, five-time Australian Open champion Serena Williams notched her 500th career singles victory when she beat Barbora Zahlavova Strycova 6-0, 6-4 to advance to the third round. The left ankle she badly sprained two weeks ago wasn't an issue. However, near the end of the match, she tweaked her other ankle and fell to the court.
"It's totally fine. It was my good ankle, so I'm good," she said.
Williams won the Australian Open in 2009 and 2010, but didn't defend her title in 2011 because she was injured.
Her older sister, Venus, has a win-loss record of 589-147, is sitting out the Australian Open because of an autoimmune disease that can cause fatigue and joint pain.
Serena is grateful to get her 500th win.
"I knew I had to get there too, because I do everything she does," Williams said of her sister's accomplishment. "It's great, it's like the ultimate."
Martina Navratilova had a career record 1,442-219, and Chris Evert retired with a 1,309-146 win-loss mark.
"I never will get there either, but it's really cool," Williams said. "Five hundred is a lot of matches to play, let alone to win."
Fourth-seeded Andy Murray, who lost to Djokovic in the final here last year, also advanced Thursday, beating Edouard Roger-Vasselin of France 6-1, 6-4, 6-4. Murray is playing his first Grand Slam tournament since hiring eight-time major champion Ivan Lendl as his coach.
"It's been good, he's obviously one of the greatest players ever," Murray said. "He's got so much experience and he's a very funny guy. You wouldn't probably expect it by the way he was on the court, similar to myself."
With top-seeded Caroline Wozniacki having a day off, No. 2 Petra Kvitova moved into the third round with a 6-2, 2-6, 6-4 win over Carla Suarez Navarro. Kvitova, who lost in the first round at the U.S. Open in the first major after winning Wimbledon, was down a service break in the third before recovering to beat the Spaniard.
"In the beginning it was OK, but I made many, many, many mistakes," Kvitova said of her 48 unforced errors. "It's part of my game but it's too many. It was very tough to get back in the third set."
Maria Sharapova, one of the three former champions in the women's draw, reached the third round after just two hours on court in two matches. The 2008 champion had a 6-0, 6-1 second-round win over U.S. qualifier Jamie Hampton in 64 minutes.
Sharapova did not play in any warmup events and spent nearly two weeks in Melbourne ahead of the season's first major while she rested an injured left ankle.
"It was more about getting my feet going," Sharapova said. "Yeah, started my preparations in the off-season a little late, took a bit of extra time in practice instead of rushing into a tournament."
She'll meet No. 30 Angelique Kerber, who beat Stephanie Dubois of Laval, Que., 7-5, 6-1.
Seventh-seeded Vera Zvonareva, a two-time semifinalist at Melbourne Park, had a 6-1, 7-6 (3) over Lucie Hradecka. No. 21 Ana Ivanovic also advanced, beating Dutch player Michaella Krajicek 6-2, 6-3.
Ninth-seeded Marion Bartoli beat local hope and former quarter-finalist Jelena Dokic 6-3, 6-3 and No. 27 Maria Kirilenko of Russia topped Aleksandra Wozniak of Blainville, Que., 6-4, 1-6, 6-2. Former U.S. Open champion Svetlana Kuznetsova beat American Sloane Stephens 7-6 (6), 7-5.
Three seeded players were beaten: No. 23 Roberta Vinci lost to China's Zheng Jie, No. 29 Nadia Petrova fell to Sara Errani and No. 25 Kaia Kanepi lost to Ekaterina Makarova.
In the men's draw, sixth-seeded Jo-Wilfried Tsonga, who lost the 2008 final to Djokovic, advanced 7-5, 6-4, 6-4 over Ricardo Mello of Brazil, while No. 5 David Ferrer struggled early against American Ryan Sweeting before coming back to win 6-7 (4), 6-2, 3-6, 6-2, 6-3
Ninth-seeded Janko Tipsarevic, No. 24 Kei Nishikori of Japan and No. 27 Juan Ignacio Chela also progressed. Frenchman Michael Llodra beat No. 32 Alex Bogomolov Jr. 6-1, 6-3, 4-6, 5-7, 6-4 and Portugal's Frederico Gil beat No. 26 Marcel Granollers in four sets.
In a night match, No. 14 Gael Monfils beat Thomaz Bellucci of Brazil 2-6, 6-0, 6-4, 6-2 and will play Mikhail Kukushkin of Kazkakhstan in the third round. Kukushkin earlier beat No. 19 Viktor Troicki of Serbia 5-7, 6-4, 6-2, 4-6, 6-3.
In an all-French match, Julien Benneteau beat 12th-seeded Gilles Simon 7-5, 7-6 (8), 1-6, 3-6, 6-2.