By the end of 2014, it appeared plain to everyone that the trail Phelps blazed had veered into a dead end.

“He had no idea what to do with the rest of his life,” Bowman said. “It made me feel terrible. I remember one day I said: ‘Michael, you have all the money that anybody your age could ever want or need; you have a profound influence in the world; you have free time — and you’re the most miserable person I know. What’s up with that?’ ”

Phelps has spent the past year and a half pondering it first in therapy as an inpatient at the Meadows and later in the pool, which started out as his sanctuary, became his glassed-in aquarium and now serves as his platform. His message: Vulnerability is a strength.

A plaque outside the natatorium at the United States Olympic Training Center here in Colorado Springs, where Phelps spent several weeks in the spring, hails him as “the most successful Olympian in history with 14 total gold medals,” as if Phelps’s story culminated with the 2008 Olympics. Phelps won six more medals, including four golds, at the London Games four years later, but in a way his narrative — at least the one worthy of proclaiming — did end in Beijing.

When Phelps looks at his legacy post-Beijing, all he sees is the tarnish. He has spent the past two years applying elbow grease in the hope of burnishing it. He said he was training as well as he ever had, but his focus was no longer on adding to his record haul of medals: the 18 golds, two silvers and two bronzes.

This time, the journey is more personal. He said he was on a quest to leave the sport without remorse over the poor training and worse behavior that defined his pre- and post-2012 Olympic experience. “This time, it’s about trying my hardest, giving it my all,” he said. “I don’t want to live the rest of my life with any regrets.”