Saying he wanted to go out on top, the 37-year-old Australian revealed the final two Ashes Tests against England will be his last Test appearances.
"It's been unbelievable -- my ride in international cricket's been phenomenal," an upbeat Warne told a packed media conference at the Melbourne Cricket Ground.
Warne said he had initially considered retirement after the 2005 Ashes but decided to press on after Australia suffered a shock series loss to England, setting him on "a mission to get that urn back".
The goal was accomplished in emphatic fashion last week when Australia took an unassailable 3-0 lead in the series and Warne said he could now retire happily, even though his remarkable bowling prowess remains intact.
"It's about knowing the right time and I like to go out on top," he said. "I think I'm going out on my terms, I'd like to think I've earned the right to go out on my terms."
Warne's world record 699 Test wickets and larger-than-life personality have already assured his status as a legend in the game.
Sydney Daily Telegraph declared Warne's departure the "End of an era" and the Australian newspaper hailed him as cricket's greatest ever bowler.
He said he was pleased to have the chance to take his 700th Test wicket before his adoring hometown crowd in the Melbourne Cricket Ground and then finish his career in Sydney, where he made his debut against India in January 1992.
"I don't think I could have written the script any better," he said.
Warne said he would see out the remaining two years of his contract with English county side Hampshire.
Warne -- almost as well known for his off-the-pitch antics including sex scandals, a positive drugs test and bookmaking controversies -- said he was looking forward to time away from the spotlight.
"I suppose there's always going to be attention on what I'm doing in my personal life, off-field ... hopefully it won't be to the same level, the same scrutiny, the same intensity, the same judgemental, moralistic sort of stuff," he said.
The scandals led to Warne being stripped of the vice-captaincy in 2000 and probably prevented him from becoming Australian skipper but he said he was not retiring with any regrets about not gaining the captaincy.
"I've given everything I possibly could to the cause, and that was winning. Cricket to me is my hobby, my passion and I love doing it. Yeah, I'll probably miss it .. I've missed One-day internationals for the last four years."
Warne said he felt privileged to have played in a champion Australian side and felt he had given something to the game's fans.
"People have turned up, I like to think that I've given them entertainment and I've tried my guts out every single time," he said.
Warne, who is expected to take up a position with Channel Nine's commentary team, said his focus in retirement would be spending more time with his three children.
He laughed off a suggestion from his former captain Steve Waugh that he could eventually coach bitter rivals England, a side he has haunted and humiliated as a bowler.
"I don't know what Stephen's on," he said.
On his immediate future, Warne said: "My focus is these next two Test matches and after that I'll sit back and have a few quiet beers and few smokes and try and weigh it all up and see what the future holds."