Swann, who took 255 wickets in 60 Tests in just five years and is sixth on the list of Test wicket-takers for England, said defeat in Perth last week, where Australia sealed the Ashes, had cemented his decision to call it a day.
His abrupt announcement further unsettles England, who trail 3-0 in the series after three heavy defeats and are battling to avoid a humiliating 5-0 series whitewash.
"My body doesn't like playing long forms of cricket, my arm doesn't cope with bowling 30-40 overs in the first innings and then repeating it in the second innings a day later.
"I could feel my performances tapering off to the back-end of games and I wasn't happy with that. As a spinner, that's when you need to come into your own.
More From This Section
"I am not willing just to hang on and just get by, by being a bit-part player. I want to win matches for England and I don't feel like I was doing that in the second innings any more. As a result, it's time to go."
Swann, a key member of the English team that won the previous three Ashes series, will miss the fourth Test starting in Melbourne on Thursday and the final Test in Sydney, with fellow spinner Monty Panesar likely to take his place for the Boxing Day Test.
Swann's withdrawal means further disruption for England following the departure of batsman Jonathan Trott earlier in the tour with a stress-related illness.