Such were the depths of a spiral that would threaten to cripple the comeback of a man widely regarded as one of the greatest sportsmen of all time.
His self imprisonment followed a second charge of driving under the influence of alcohol, in September 2014, that led to a six-month suspension by USA Swimming.
If swimming is one of the most individual sports there is, it turns out that behind the world’s greatest Olympian is a support network of family and friends. They were key to Phelps summoning the courage to seek help.
“I’m so thankful for the support that I have,” Phelps told CNN in an emotional interview with Coy Wire, conducted earlier this year.
“Those days when I was sitting in my room, where I didn’t move for four days, I had the support team of my friends and my closest family members and everybody who was there — my house was like a revolving door.
“They were people who matter the most to me and were there because they truly care about me. I was like, ‘That was a really dumb idea, let’s figure this out.'”
Many would have thought Phelps had it all at the time he reached rock bottom in 2014: a haul of Olympic medals some countries would have proud of, prodigious talent in the pool, plus adulation from fans around the world.
But, after retiring from the pool after London 2012, his self-worth deserted him. He lost purpose and direction.
Phelps describes the darkness that enveloped him as a “time bomb waiting to go off.” It was during this period he even contemplated suicide.
Asked what has scared him most in his life, he replied: “I would probably say when I didn’t want to be alive anymore. At that point, I thought ‘The best thing to do is just not to be here.’
“I’ve been known to not always make the best decisions. It’s put me into interesting and tough spots at times.”
If it took determination and talent for Phelps to win all those gold medals, it also took courage to admit he needed to seek help.
“I think it took those spots for me to be able to learn exactly what’s going on and what I needed to change. At that time I just knew I needed help and I knew I needed to change something in my life.
“I was kind of in a lost place so we did some research on what we could do and I went to treatment for a couple of weeks and just basically rebuilt myself. They kind of tore me down and built me back up and I went through some things that I never wanted to go through before.”
Mental health ambassador
Speaking out marked the turning point for Phelps and part of his post-swimming career is dedicated to encouraging others, especially children, do the same.
He and fellow Olympian Allison Schmitt were ambassadors for the National Children’s Mental Health Awareness Day in May.
Phelps relays the story of William, a young boy who lost his father and regularly attends the Boys & Girls Club program in Tennessee — part of the swimmer’s foundation — whom he has helped to recognize different emotions and encouraged to be open about them.
“As an American it’s (seen as) weakness when you ask for help and in our society, it’s just not what you do,” he said. “It took me a while to get to that point where it’s OK to ask somebody for help.
“When I went to treatment I didn’t want to talk to anybody, I didn’t open up and two or three days into it I was like ‘I’m here for 45 days, I might as well do this.’
“I might as well just attack it. I just looked at it as another challenge for me to get better. I just took full advantage of it and dove in and this is where we are today.”
Triumphant Rio return
Where we are today is with Phelps’ legacy enhanced and emboldened by a haul of five Olympic gold medals at Rio 2016 to take his overall tally to an incomparable 23.
The fact the Baltimore-born star had been retired for two years before deciding to compete in Brazil, at the age of 31, makes it even more remarkable.
Rehab done and focus regained, he also rediscovered his zest for competition, and got himself in better shape than he ever had before.
The hunger for training that had, by his own admission, dissipated in the lead up to London 2012 — an event in which he still claimed six medals, four of them gold — returned with a vengeance.
“I knew I had to get myself in the best physical shape I could, especially at the age of 31,” he said. “For me that was eating or sleeping right, doing every little ABC to make sure I was as prepared for every single workout as I could.
“Eating became a job. There are days when you’re tired and you don’t want to eat but you have to, you’re forcing yourself to eat and it was just painful.
“I got down to four-and-a-half percent body fat. I mean, it’s basically like skating on thin ice — any lower than that is unhealthy.
“Holy hell, four-and-a-half percent was just ridiculous. I don’t think I’ll ever get back to that again.”
In what was his fourth Olympics, Phelps entered six events in Rio and won five of them.
His tally of 28 medals sets him apart as the most decorated athlete of all time — a full 10 clear of former Russian gymnast Larisa Latynina.
And though his triumphant return thrilled the sports-loving public across the globe, the perfectionist in Phelps can still, incredibly, pick a few holes in his performance.
“The 200 meter (butterfly) was something that I wanted back, I wanted to retire with that race with that gold medal,” he said.
“I’m always hard on myself. I mean I saw the replay of the 200m (individual medley) this morning and they’re like ‘It was amazing’ and I was like, ‘Yeah, still didn’t break the world record.’
“That was that was one thing I wanted — I wanted to break one more world record. I wanted to go out with 40 world records and that would have been awesome. But you know what, to four-peat that race is pretty awesome.”
Awesome is a fitting word to sum up Phelps’ career and perhaps the enormity of what he has achieved will only sink in as the years go by.
“It’s been a fun career and now I get to kind of go back and look at everything that I did, because I never had that,” he explained.
“I was always going from one thing to the next and the next the next. And now I finally get to look at the medals and realize what happened in the 20-plus years that I was swimming.”