Singapore's only Olympic champion Schooling retires from swimming
Schooling made the announcement on social media eight years after stunning the world by beating American great Phelps to win 100m butterfly gold.
Schooling failed to qualify for the same event at Tokyo 2020 and his career started to ebb after winning gold medals in the 50m and 100m butterfly at the 2018 Asian Games in Jakarta.
"Today marks the beginning of a new chapter - I will be retiring from competitive swimming," the 28-year-old said on Instagram.
"I am filled with gratitude for every experience that swimming has brought into my life.
"The victories were exhilarating, the defeats humbling and together they have forged a resilience in me that I will carry forward into my next chapter."
In an interview with the Straits Times newspaper, Schooling said he had become complacent.
"My mistake was the complacency to think that this will last forever because I'm so far ahead," he said.
"Add on ego, add on pride. Add on that 'I'm never going to be shut down attitude'. That's a recipe for complacency. That's one of the lessons that I learnt."
Doubts were cast on his future when he pulled out of last year's Asian Games and Southeast Asian Games, saying he was "not at the level" to do his best.
Schooling, who has performed two years of mandatory military service, was mired in controversy in 2022 after confessing to taking cannabis overseas.
Singapore has some of the toughest drugs laws in the world, and citizens can face up to 10 years in prison if found to have consumed illegal substances outside the city-state.
Schooling was given a warning and placed on a supervised urine test regime for six months.
He was also made no longer eligible for leave to train or compete during his military service.
"While I am stepping away from competing, swimming will forever be a part of who I am," he said.
"It has given me a platform to inspire others to chase their dreams, no matter the odds."
Schooling told the Straits Times he was now going to work with two venture capital partners in the "health and wellness, tech and sustainability" sectors, and play more golf.