China's three-time Olympic swimming gold medallist Sun Yang hopes to compete at Paris 2024 after a doping ban is completed ©Getty Images

China’s three-time Olympic gold medallist Sun Yang is hoping to compete at Paris 2024, despite a doping ban due to end only a few weeks before the Games are scheduled to open.

Sun, the first male swimmer in history to earn Olympic and World Championship gold medals at every freestyle distance from 200 to 1500 metres, was initially suspended for eight years in 2021 for refusing to give a sample to doping inspectors.

His suspension was later reduced to four years after an appeal to the Court of Arbitration for Sport (CAS) in 2021, which ruled him out of the re-arranged Olympics at Tokyo 2020.

The ban also means he will miss the Asian Games, which are due to open in his home city of Hangzhou on September 28.

Sun will have turned 32 by the time the Olympics open on July 26, but told the sports channel on Chinese social network Weibo that he remained determined to compete in the French capital.

Sun Yang is the first male swimmer in history to earn Olympic and World Championship gold medals at every freestyle distance from 200 to 1500 metres ©Getty Images
Sun Yang is the first male swimmer in history to earn Olympic and World Championship gold medals at every freestyle distance from 200 to 1500 metres ©Getty Images

"Personally, I never said that I was retiring or that I was giving up," said Sun, who revealed earlier this year that he was training "every day" for Paris 2024.

"Every stage of life we experience different difficulties and setbacks, and now I have completely let go," Sun said in the interview.

"It depends how you stand up from difficulties and setbacks.

"Athletes are most afraid of falling apart, which will lead to a decline in mentality and state.

"I always tell myself that I must maintain a healthy body and state.

"No matter what industry I will be in the future, I can continue to contribute to the training of coaches and clubs."

Sun, who has also won 11 World Championship gold medals and holds the world record for 1500m, has always maintained his innocence and claimed that the ban has made him stronger.

"Perhaps I would not have changed so much or matured so quickly if I had not experienced these difficulties and setbacks," he told Weibo.

The Court of Arbitration for Sport shortened an eight-year ban on Sun Yang after the panel chairman had posted anti-China comments on social media ©Getty Images
The Court of Arbitration for Sport shortened an eight-year ban on Sun Yang after the panel chairman had posted anti-China comments on social media ©Getty Images

Sun was originally just warned by the International Swimming Federation (FINA), as the world governing body was then called, about his conduct during an attempt to take blood and urine from him after drug testers had made an unannounced visit to his home in September 2018.

It turned confrontational after midnight when he questioned the officials' credentials.

It led to Sun's entourage ordering a security guard to use a hammer to smash the casing of a blood vial so it would not be valid for testing.

The World Anti-Doping Agency appealed to CAS to overturn the FINA tribunal ruling.

The Lausanne-based court reduced its original ban of eight years after Sun appealed to the Federal Tribunal in Switzerland over alleged bias because the CAS panel chairman had posted anti-China comments on social media.

Sun was also banned for three months in 2014 for a separate doping offence.