"After much thought over the last few weeks, I have decided to step down as England Test captain and announce my retirement from all forms of cricket," Strauss said in an England and Wales Cricket Board (ECB) statement issued ahead of a news conference at Lord's.
"It has clearly been a tough decision to make, but I believe that it is both in the best interests of the England cricket team and myself to step down at this stage," the 35 year old, who played exactly 100 Tests, added.
"The driver to all this is I haven't batted well enough for a long time. I wasn't going to improve batting-wise, I've run my race," Strauss later told the news conference.
"It's one of these decisions when you know when your time is up.
"It is important for a captain to not be a passenger and that people are not speculating whether you should be in the side."
Alastair Cook, already England's one-day captain and Strauss's opening partner in the five-day game, was announced as the new captain of the Test team.
Strauss insisted his retirement had nothing to do with the ongoing England exile of star batsman Kevin Pietersen.
England dropped Pietersen after he admitted sending "provocative" texts to South African players. Some of these were alleged to have been critical of Strauss.
Strauss said he had spoken to the England coach Andy Flower about retiring "before the Kevin Pietersen situation reared its head".
His last Test was a 51-run defeat by South Africa at Lord's earlier this month that saw England surrender their No 1 Test ranking to the Proteas.
Strauss scored 21 hundreds – one shy of England's all-time record – and led England to the top of the world Test rankings, a run that included home and away Ashes wins in 2009 and 2010/11.
Cook's first Test as captain will be the first of a four-match series in India in November.
The 27 year old paid tribute to Strauss by saying: "Andrew's contribution to England cricket in recent years is evident to everyone who follows the sport but only those of us who have been lucky enough to share a dressing room with him are fully aware of his immense contribution to our success.
"He has been a fantastic captain, has led from the front for three-and-a-half years and is a true ambassador for the game.
"I know this can't have been an easy decision for him and everyone in the dressing room will be sad to see him go.
"I'm very excited by this new challenge, it is a huge honour to be appointed Test captain."
David Collier, the ECB chief executive, said: "On behalf of the ECB and everyone involved in cricket I'd like to thank Andrew Strauss for his outstanding contribution to the game.
"Andrew's calmness and authority when dealing with some of the most difficult moments in our sport in recent times should be applauded and I have no doubt that his contribution as an ambassador for the game will be recognised by anyone who has had an opportunity to spend time with him."
Follow us @SprtNationalUAE