The 35-year-old, who first announced his decision on his Twitter page, sustained a right calf strain in the fourth one day match of Australia's limited overs tour of England and was forced to return home for further examination and treatment.
"The last two or three nights I have thought about it a lot and I woke up this morning and thought this was the right day to do it," Lee told a media conference at Sydney Cricket Ground.
"It's almost like there has been a huge weight lifted off my shoulders. I have been a bit anxious the last two days. It has been a hard few days."
Lee had been expected to be available for the World Twenty20 tournament in Sri Lanka later this year, and he said he had held discussions with the selectors about retiring from after that, but the most recent injury had changed those plans.
"It (retirement) was going to be post-World Cup but I woke up this morning and felt ... that the time was right," he added.
"To play international cricket you need to be mentally and physically 100 per cent and I didn't think it would be fair to the team or myself if it wasn't in that space.
"Looking ahead at the next two months I just didn't have that desire any more. It's not a lack of commitment but you just get to that point in your life when enough's enough and the great run is at an end."
Lee last played a Test match in 2008, but continued to play international limited overs matches for Australia and in India's lucrative Twenty20 competition. He retired from Tests in 2010.
He told Australia's Channel Nine television he would continue to play Twenty20 cricket in Australia and India.
In his prime Lee was one of the fastest and most aggressive bowlers in the world but has suffered from a long list of injuries that blighted his career, including stress fractures, ankle injuries, side strains and more recently a broken foot.
He took 310 Test wickets at 30.81 and 380 one-day international wickets at 23.36, one short of Glenn McGrath's Australian record (though McGrath took one of those representing the ICC World Xi, so the pair share the record for Australia).
"The statistics only tell part of the story," chairman of selectors John Inverarity said.
"Brett has been an absolute ornament to the game; a fine player, a fierce and brave competitor, a generous opponent and one who always upheld the highest standards of sportsmanship.
"He has been a cricketer in every sense of the word."