The 36-year-old posted a message on Chinese social media outlet Weibo and Instagram on Saturday (4 July) explaining that his body would no longer allow him to reach his previous lofty heights.
Lin wrote, "'Persevere', I said to myself in every moment of suffering, so that I could prolong my sporting career.
"Rather than simply pursuing rankings as I did when I was younger, in recent years I have been wanting to challenge the physical limits of an 'old' athlete and practise the sporting spirit which I will never give up.
"But my physical abilities and pain no longer allow me to fight alongside my team-mates. After 20 years, I have to say goodbye to the national team.
"I have dedicated everything to this sport I love." - Lin Dan announcing his retirement
Lee Chong Wei pays tribute
His old adversary Lee Chong Wei, the man Lin Dan beat in two Olympic finals, was one of the first to pay tribute with a poem.
The pair's rivalry at the top of the sport was captivating, particularly the London 2012 final.
Beijing 2008 saw Lin capture gold relatively easily 21-12, 21-8, but London was a different story.
Lee was world number one and favourite for the crown, but the Chinese found an extra gear in a classic final, winning gold again after a 79-minute 15-21, 21-10, 21-19 thriller.
Five-time World Championships medallist and Lin's victim in the quarter-finals at Beijing 2008, Denmark's Peter Gade, also offered his praise to his former opponent.
One of badminton's all-time greats
With two Olympic golds and five world titles, Lin is the most successful shuttler in modern-day history.
He claimed his first title in 2002 at the Korea Open and shot up the world rankings the following year with victory in the Denmark, Hong Kong and China Opens while still a teenager
Lin became world number one for the first time In February 2004 and solidified that status with his first All England Open title the following month.
Beaten finalist Peter Gade called him 'Super Dan' after their clash in Birmingham, and the name stuck.
After guiding China to their first Thomas Cup success for 14 years, Lin's Olympic year started to unravel.
The youngster suffered a leg injury weeks before the Athens Games and, despite being top seed, fell in the opening round to Singapore's Ronald Susilo.
He was soon winning tournaments again, but lost in the 2005 All England final to fellow Chinese Chen Hong.
This year saw the emergence of Lee Chong Wei with Lin going down to the Malaysian in the final of the Malaysia Open.
Lin also fell just short in the World Championships, suffering a crushing 15-3, 15-7 defeat to Indonesia's reigning Olympic champion Taufik Hidayat.
But the big titles did not elude him in 2006 as Lin regained his All England crown and beat compatriot Bao Chunlai to become world champion for the first time.
Hidayat was Lin's biggest rival early in his career, and he again denied the Chinese in the Asian Games final in Doha.
As Hidayat's star waned, Lee quickly became Lin's greatest adversary.
Lin retained his world title in Kuala Lumpur with home favourite Lee going out in the third round.
But a year later, the pair met in the Olympic final at Beijing 2008 with the home crowd providing deafeningly vocal support.
And it was Lin who prevailed in comfortable fashion - 21-12, 21-8 - to complete a full set of individual and team global titles.
The man for the big occasion
Lin defeated Lee to clinch his fourth All England Open title in 2009 in what was another superb year for the Chinese left-hander.
He was unbeaten from August to November, claiming his third consecutive world title.
Lee took over as world number one in October, and stayed there thanks to victory in the Super Series Finals and seven titles in 2010 including his first All England triumph.
This was a slightly disappointing year for Lin who was surprised by Park Sung-hwan in the World Championship quarter-finals, but he did beat Lee to claim Asian Games gold in Guangzhou.
Lee exacted revenge in the 2011 All England final, and they met again in the final of the World Championships which doubled up as the test event for the London 2012 Olympics.
In an epic encounter, Lin came from behind to win 23-21 in the third and claim his fourth world crown.
Despite a number of injury-related retirements from tournaments, Lin won his fifth All England title in March 2012 before helping China to a fifth consecutive Thomas Cup.
He also ended Lee's 142-week stint at the top of the world rankings weeks before the defence of his Olympic title.
After beating old rival Hidayat in round two, Lin survived a scare against Japan's Sho Sasaki before making it through to the final.
On the other side of the net inside Wembley Arena, just as he was 12 months previously and in the final at Beijing 2008, was Lee who was desperate to claim his first global title.
In another titanic clash, Lee took the first game but Lin hit back to take victory 15-21, 21-10, 21-19 and become the first man to retain the Olympic singles title.
Fifth world title
Lin took most of the next 18 months off, playing just twice in 2013.
He retired ahead of his quarter-final at the Asia Championships, and then took a wildcard into the World Championships in Guangzhou.
Despite a lack of match practice, he claimed his fifth world crown with Lee his victim in the final yet again.
As had been the case in both the 2011 world final and the 2012 Olympic final, Lin dropped the first game before roaring back and he led 20-17 in the decider when Lee was forced to retire with a knee injury.
But 2014 proved a turning point with the BWF refusing to issue Lin another World Championships wildcard leaving him unable to defend his title.
Chen Long beat Lee in the final to stake his claim to be China's number one.
And with Lin and Lee very much in the autumn of their careers, it was Chen who started to become badminton's dominant force.
On his day, Lin could still mix it with the best and won the Asia Championships and Japan Open in 2015, followed by a sixth All England title in 2016.
But his hopes of an unprecedented hat-trick of Olympic golds at Rio 2016 were ended in the semi-finals with Lee finally beating his old foe at the Games.
And defeat to Viktor Axelsen in the bronze medal playoff saw Lin leave Brazil empty-handed.
Lin met Axelsen again in the final of the 2017 World Championships in Glasgow, and it was the Dane who came out on top again to claim his first world crown.
While not quite at his brilliant best, Lin was still capable of going deep in tournaments and reached his 10th All England final in March 2018.
But the veteran lost out to compatriot Shi Yuqi and, bar victory at the New Zealand Open, went on to endure a terrible remainder of the year, going out in the first round no fewer than nine times.
He bounced back to form at the 2019 Malaysia Open, beating Rio 16 gold medallist Chen Long to claim his first title in 11 months, but his form soon dipped again.
Last October, he vowed to keep going and said, "Qualifying for the Tokyo Olympic Games is my biggest challenge" with Chen and Shi comfortably occupying the two spots available for China.
The postponement of the Games due to COVID-19 persuaded a rethink.
He may have only shown flashes of his best in recent years, but his place in his sport's history is secure.