Ed Whitacre announced his resignation Thursday, effective Sept. 1.
Whitacre will be replaced by GM board member Daniel Akerson, the managing director and head of global buyout of The Carlyle Group.
Akerson, 61, will be GM's fourth CEO in 18 months when he takes over the job.
Whitacre, 68, was named GM's chairman last July when GM emerged from bankruptcy protection. After he ousted CEO Fritz Henderson, Whitacre was named interim CEO in December and became permanent CEO in January.
Earlier in the day GM said it made $1.33 billion in the second quarter, a sign it's getting healthier as it prepares to sell stock to the public.
It was the second straight quarterly profit for GM, which made $865 million in the first quarter.
Second-quarter revenues totaled $33.2 billion, up 5.3 percent from the first quarter on growing sales in every region except Europe. In the U.S., GM saw strong sales of new and redesigned models like the Chevrolet Equinox wagon and Buick LaCrosse sedan.
The automaker also said it lost $12.9 billion in the second quarter of 2009, or $21.12 per share.
Before this year's first-quarter results, GM hadn't reported a profit since the second quarter of 2007.
GM has been working to streamline operations and slash costs. It has shed four brands, changed leadership and last week announced its U.S. dealership network would number 4,500, about 25 percent smaller than it was in early 2009.
But it still faces hurdles. GM's U.S. sales rose 14 percent in the first six months of this year compared to the same period in 2009, according to AutoData Corp. That was slightly less than the average industry increase of 17 percent. GM had the highest incentive spending of any major automaker at $3,691 per vehicle, almost $1,000 more than the industry average, according to Edmunds.com.
GM has also relied heavily on sales to rental-car, government and corporate fleets, which are less profitable than sales to individual customers. Retail sales - or sales to individuals - were up 11 percent industry wide through June, but up only 1 percent at GM.
Whitacre, the former head of AT&T, often said in a folksy Texas drawl that he knew little about cars. But he shook up the company with a number of managerial changes, including luring Chief Financial Officer Chris Liddell from Microsoft Corp. He also combined sales and marketing responsibilities and consolidated control of GM's core North American market under one executive.
Whitacre said the board was aware of his plans the day he accepted the CEO job, and he predicted a smooth transition.
"I believe we've accomplished what we set out to do," Whitacre said. GM reported its second straight quarterly profit on Thursday.
Akerson has been involved in GM's transition every step of the way, Whitacre said. "He's absolutely the right choice."
Akerson has served on GM's board since July 2009. He has worked for The Carlyle Group since 2003.
Like Whitacre, Akerson has a background in telecommunications. He worked in top executive positions at MCI Communications in the 1980s and 1990s. He also served as chairman and CEO of XO Communications Inc., where he oversaw a major restructuring, and chairman and CEO of Nextel Communications Inc., where he shifted the company from a regional walkie-talkie maker to a digital wireless provider.
Akerson said he does not expect to make big management changes when he takes over for Whitacre in just under three weeks.
He said he knows GM's management well and that Whitacre has made significant changes in his year at the helm. Those changes have pointed GM in the right direction.