He gained further recognition when he dated high-profile women like Gigi Hadid and Miley Cyrus, and collaborating with other household names for his music.
But, while watching the swimmers compete at the 2016 Rio Olympics, Cody was reminded that he had unfinished business in the pool.
“There were multiple guys there I used to train with and compete against. I remember thinking, ‘I could have been here’. That’s what it was,” he told the Sydney Morning Herald.
“Since Rio, I don’t think there was a week that went by when I didn’t think about it. That’s five years ago now. Then 2020 came and I had decided I would start training again and dedicate four years of my life to it.”
To pursue his ambition in swimming, it would mean Cody would have to scale back on his music career significantly, which was a worry his mum Angie felt and expressed to her son.
"I'd say: 'Why would you go back to looking at that black line?'" Angie admitted to the Courier Mail.
"'Look at all you've done, all you've achieved, you've been on Broadway, you've done this, you've done that and you want to swap it for that solitude, for that hard-core work you'll have to put in, the hours up and down the pool?'"
Despite her worries, the 24-year-old managed to convince her that this was something he needed to do and that it was a "burning desire" he had to see it through.
"It’s about seeing something through that I never finished, and it’s about having a crack. I want to give it a red hot go, and if it goes nowhere, fair enough, but if I don’t do it now I’ll never do it'," she repeated her son's words to the Courier Mail.
“‘I’ll always have music, but there’s a limited time for swimming and I just want to be able to, win or lose, look back one day and say, well, at least I gave it my best shot’.”
With the support from his family and his mind made up, Cody dived right into the deep end and qualified for this year's Australian Olympic trials in the 100m butterfly.
"Growing up competing, and then inevitably having to cut my career short as a 13 year old Australian champion when I received an opportunity in music that I couldn’t refuse," Cody penned on Instagram.
He added that as a musician he has had the chance to experience and learn from touring around the world, releasing albums, and performing on Broadway.
"Now almost exactly 10 years later, here I am poolside once more," he said.