The 36-year-old Langer said he had agonised for months and while he wanted to keep playing, he realised his time was up.
''The reason it's been so hard is that I don't want to let it go.
I don't want to stop playing for Australia,'' he told a news conference after training at the Sydney Cricket Ground.
''It's emotional, I feel sad about it but I know in my heart it's the right thing to do.'' Langer said he had considered retiring early last year when he was struck on the head and concussed by a bouncer from South African fast bowler Makhaya Ntini.
Doctors were concerned about his long-term health but Langer, who holds a black belt in martial arts, refused to quit, even offering to bat in the second innings if his team needed him.
''When I got struck on the head in my 100th test, 98 percent of people said you can't bat, it's just a game... but to me, it's not just a game,'' he said.
''It's been the vehicle that I've learned how to handle success, how to handle criticism, how to handle failure, how to fight back from adversity.
''I've learnt about mateship, I've learnt about leadership...
it's never been just a game for me.'' HEAVYWEIGHT BOXER Langer missed Australia's mid-year series in Bangladesh and fought off the challenge of Phil Jaques to retain his place for the Ashes, then silenced his doubters with a century in the first test in Brisbane.
''I had this burning ambition to beat England again,'' he said.
''In the first test in Brisbane I felt like a heavyweight boxer going out there... I was just so focussed on it.
''That's one of the things I'm really going to miss -- going into battle on the big stage with some of the great players.'' Langer's place in Australian cricketing folklore is already assured. Originally a number three batsmen, he moved to opener in 2001 and has played 104 tests before Sydney, scoring 7,650 runs including 23 centuries at an average of 45.26.
His record includes three double-hundreds, including a career-best 250 in the Melbourne Ashes test of 2002.
He formed a hugely successful opening partnership with fellow left-hander Matthew Hayden, which ranks as the best in Australian history.
''I've played in an incredible team so I retire from this game having played with some of the greatest players of all time,'' he said.
''I'm very proud of the partnership I've formed with Matthew Hayden and the friendships I've made with all the other players.'' UNDER PRESSURE Langer made his test debut in 1993 and played in a golden era alongside the likes of Warne, McGrath, Ricky Ponting and Adam Gilchrist.
His record speaks for itself but his achievements were largely overshadowed by the feats of some of his team mates.
While the likes of Ponting and Gilchrist would effortlessly destroy opposition attacks, Langer was a grafter who had to work hard for every run.
He was seemingly always under pressure to hold his spot in the side yet never lost any of his enthusiasm and passion for the game and was regarded as the heart and soul of the team.
''I've never captained Australia but one of the absolute highlights of my career was when Ricky Ponting told me I could lead the team song for the rest of my test career,'' Langer said.
''Only a few people get to do that and it was a great privilege for me. That to me is part of the leadership of Australian cricket.'' Langer said he would continue playing first-class cricket for Western Australia and English county side Somerset but was not sure how long he would last without the lure of playing for Australia again.
''I'm not sure how I'll get that later in my life, but life will go on.'' ''The upside of retirement is that I can spent some time with my family and give them the attention they deserve.'' REUTERS SAM PM1500