"After a great deal of consideration I have decided to call it a day on my international and first-class career," Swann, 34, said in a statement. (Agencies)
"This decision has been very difficult seeing as the England team has been my family for seven years now, but I feel that now is the right time to step down."
Off-spinner Swann, a popular character in the England team, has been under pressure to keep his place in the squad after taking seven wickets at an average of 80.00 in the three Ashes Tests in Australia.
Swann is widely regarded as world cricket's premier spinner, with 255 wickets in 60 Tests at 29.96 since his Test debut in 2008. He is the sixth-leading Test wicket taker of all time for England.
Swann's shock decision comes a week after England lost the Ashes to Australia following a heavy defeat in the Perth Test to give the home side an unassailable 3-0 series lead with two Tests to play.
His abrupt retirement call means he will be unavailable for the fourth Test, starting in Melbourne on Thursday, and further unsettles the England team following the departure of batsman Jonathan Trott with a stress-related illness earlier in the tour.
"With two games to go in Australia and then a fiercely competitive summer against Sri Lanka and India I feel that it is a great time for someone else to strap themselves in and hopefully enjoy the ride as much as I have," Swann said.
"I'd like to thank all my England teammates for their non-stop support and camaraderie and of course wish Andy Flower and Alastair Cook all the success in the world for the future.”
"First and foremost I am a fervent England fan at heart."
England team director Andy Flower said: "Graeme Swann has made an outstanding contribution to the England cricket team in all formats throughout an incredibly successful career, and I would like to congratulate him on all that he has achieved.”
"His commitment, competitive spirit and sense of humour have been recognized and admired by teammates and supporters alike, and he has played a big part in England's success over the last five years.”
"The dressing room will be a very different place without Graeme's unique personality and I would like to wish him all the very best for the future."
Former England captain Michael Vaughan tweeted: "Too soon IMO for Graeme Swann 2 retire but it's been a absolute pleasure watching him perform for many years. Finger spin out of the top draw.”
"Of all the England players over the last 20 yrs he is the one the team (will) miss the most ... Spinners of his quality are a rare breed."
"After a great deal of consideration I have decided to call it a day on my international and first-class career," Swann, 34, said in a statement.