Riiber who has the overall Nordic combined record of 76 individual World Cup wins and eight world championships gold medals, was recently diagnosed with Crohn's disease, a chronic inflammatory condition in the digestive system.
"That illness came as a bit of a surprise to me. I didn't understand the extent of it at the time," he told a press conference on Wednesday, adding that spending more time with his family also played a role in his decision to retire.
"The health situation eats up the surplus, and governs all choices and priorities. I feel like a prisoner at the moment and priorities are taking away time from what matters most to me."
While Riiber has not won an Olympic gold medal, he was considered a favourite in the Nordic combined events at the upcoming Games, having won four gold medals at the 2023 World Championships.