After meeting with Allen at the White House, the president issued a brief statement praising Allen's service. He called the 57-year-old Allen "one of America's finest military leaders, a true patriot, and a man I have come to respect greatly."
Allen appeared to be a shoo-in as the next top commander of allied forces in Europe. Obama nominated him last Oct. 10, but in November Defense Secretary Leon Panetta stunned many by announcing that Allen was being investigated for potentially inappropriate email exchanges with a Florida socialite, Jill Kelley. Panetta put Allen's nomination on hold.
Last month, shortly before Allen completed a 19-month tour as the top U.S. commander in Afghanistan, the Pentagon announced that Allen had been cleared of any wrongdoing and the White House said it was prepared to re-nominate him for the Europe job.
Even so, it was not clear that Allen would choose to go ahead with a Senate confirmation hearing, given the nature of the email probe.
An Iraq war veteran with a reputation as an astute strategist, Allen took over in Kabul in July 2011, succeeding Gen. David Petraeus, who quit to become CIA director. Allen relinquished command Feb. 10 to a fellow Marine general, Joseph Dunford.
Allen said retiring from the military was "the only choice I could make." Although he did not explain his reasons in detail, he said "my primary concern is for the health of my wife, who had sacrificed so much for so long." He served 38 years in the Marine Corps.
In retiring, Allen passed up Obama's offer to promote him to the Europe job, which is one of the more prestigious jobs in the military. It carries the dual responsibilities of commanding NATO troops from allied headquarters in Belgium and heading the U.S. European Command, a separate organization based in Germany.
The U.S. has about 80,000 troops based in Europe.
It's unclear who Obama will nominate for that job. The current commander, Navy Adm. James Stavridis, had planned to leave last year, but was asked to stay on until Allen could take over. He is expected to remain until a successor is confirmed.
Army Gen. Carter Ham might have been a logical choice, in part because he previously served as commander of all U.S. Army forces in Europe. But he is scheduled to retire this year. He currently serves as commander of U.S. Africa Command.
In a written statement Tuesday, Allen he wants to focus on helping his wife, Kathy, cope with health issues. He was not specific about her ailments, but The Washington Post quoted Allen on Monday as saying that his wife suffers from a combination of chronic health issues that include an autoimmune disorder.
"The reasons for my decision are personal," Allen said in his statement. "I did not come to it lightly or quickly, but given the considerations behind it, I recognized in the end it was the only choice I could make.
"While I won't go into the details, my primary concern is for the health of my wife, who has sacrificed so much for so long. For more than 35 years, my beloved Kathy has devotedly stood beside me and enabled me to serve my country.
"It is profoundly sobering to consider how much of that time I have spent away from her and our two precious daughters. It is now my turn to stand beside them, to be there for them when they need me most," he said.
Allen told the Post that his decision to retire was not influenced by the investigation of his email exchanges with Kelley, who was tied to the sex scandal that forced Petraeus to step down last fall as CIA director. Allen told the newspaper, however, that publicity surrounding the email probe "took a toll" on his wife.
Word began to spread last week that Allen was having second thoughts about taking the Europe job. When asked at a news conference last week about Allen's status, Panetta told reporters that the general had been "under a tremendous amount of pressure," including difficult recommendations on the future course of U.S. military involvement in Afghanistan. Panetta said he advised Allen to take time to weigh his options, consult with his family, and decide his future.
In a statement following Obama's announcement Tuesday, Panetta heaped praise on Allen.
"He has earned the lasting thanks of this nation for carrying the heavy burden of leadership with utmost professionalism and courage," Panetta said. "I wish him and his entire family all the best in the next chapter of their lives."
Associated Press writer Josh Lederman contributed to this report.