Police were called after Thorpe was found disoriented and behaving oddly near a vehicle, with a nearby resident having made the call after believing that a break-in was in progress.
The 31-year-old was later taken to Bankstown hospital on Monday, and was released later on condition that he enter rehab.
"He is in rehab for depression," Thorpe's manager James Erskine told the Australian Associated Press. "The owner of the car basically called the police and the police came.
"They realised it was Ian Thorpe. They realised he was disoriented."
Erskine added that Thorpe - who spoke openly about his battles with depression in his recent autobiography - believed he was sitting in a friend's car.
The five-times Olympic champion, who made his Games debut as a teenager in Sydney in 2000, retired in 2006 citing waning motivation and made a comeback early in 2011 but failed to make the Australian team for London.
Erskine said Thorpe was taking anti-depressants and medication for a shoulder injury but was not under the influence of alcohol.
"He hadn't had a drink," Erskine added. "He had zero alcohol in him."