The 36-year-old sent a statement to Sri Lanka Cricket chief executive Duleep Mendis confirming his retirement, just 11 days after he launched a stinging attack on the national selectors.
"I write to inform you that I will be retiring from international cricket for Sri Lanka with effect from Nov 21st 2007," the statement, released to the media, said.
Atapattu played 90 Tests for Sri Lanka, scoring 5502 runs at an average of 39.02, but was expected to face disciplinary action on his return home after describing the selectors as 'muppets.'
"Sri Lankan cricket, I think at this moment in time, is not going the way, the direction, it should be going," Atapattu told reporters during last week's first Test in Brisbane.
"Especially with the muppets, basically, headed by a joker."
Atapattu was initially overlooked for the Australian tour but then included after the country's sports minister Gamini Lokuge intervened.
He top-scored with 57 in Sri Lanka's first innings in the opening Test in Brisbane and scored 80 in his final innings in Hobart.
Sri Lanka captain Mahela Jayawardene said he was saddened by Atapattu's decision but was glad he was able to go out on his own terms.
"It's emotional. It was a bit of a surprise for us as well because he made a strong comeback after not playing for some time and was very determined to show what he was capable of," Jayawardene told a news conference.
"He proved that to a lot of people. The work ethic he had was incredible. It's sad, but he made a very good speech in the dressing room.
"He felt it was the right time to leave Sri Lanka cricket and give others the opportunity. He made that decision himself, that was great."
Atapattu, a right-handed opening batsmen, also played 268 one-day internationals for Sri Lanka but his best performances were in Tests.
He scored 16 hundreds and 17 half-centuries and had a great ability to make big scores, converting six of his tons into double-centuries, a feat bettered only by Don Bradman (12), Wally Hammond and Brian Lara (seven each).