FORTUNE — “I’m going to prove you wrong.” That’s what Procter & Gamble CEO Bob McDonald said to me on April 29th, when we crossed paths at Fortune’s Brainstorm Green conference in Laguna Niguel. It was an awkward moment: Just over two months earlier, I had written a long, critical analysis of his performance as CEO (Can Bob McDonald Hang On?), and this was the first time we’d seen each other since Fortune published the article. What McDonald intended to prove was that he would stay in his job — and succeed.
Less than a month later, it was all over. On Thursday after the market close, P&G (PG) issued a release stating that McDonald, 59, was retiring, effective June 30, after almost four years at the helm — and that his predecessor, A.G. Lafley, would take over as CEO, chairman, and president immediately. Although the stock had remained near an all-time high, helped by the bull market and signs of renewed energy at the $84 billion maker of Crest, Pampers, and Pantene, top-line growth remained elusive, even as competitors like Unilever (UL) managed it. Says Gary Martin, a former senior executive who wrote the board a letter complaining about McDonald’s management last year: “I think it’s in the best interest of the company, and it’s overdue.”
Though long rumored, the news came as a shock when it finally broke. Many executives were in Geneva for P&G’s Alumni Network Global Conference, a gathering at which McDonald himself had been scheduled to speak. Even Procter’s PR team, some of whom were in Geneva, seemed to be taken by surprise; they had to release the news after the market close in the U.S. — meaning they were fielding calls through the middle of the night.
Several executives close to the company told Fortune they hadn’t known such a move was imminent — and hadn’t had any inkling that Lafley, who had gotten remarried and taken up triathlons, would be interested in returning.
Whether or not McDonald resigned of his own accord or was pushed, it is surely a painful turn of events for a man who was devoted to P&G and who as recently as February proclaimed himself “energized” by the challenges of the job. Says John Lame of Lenox Asset Management, a Cincinnati-based money management firm that works with many Procter & Gamble employees: “Bob is a good man who worked very, very hard to get the job. It’s a difficult situation, but I admire him for stepping out and letting the new generation of leadership come forward.”
This is not the first time a former CEO has returned to P&G. Back in 2000, when Durk Jager was fired and the then-unknown Lafley was named CEO, former P&G CEO John Pepper stepped back in as chairman to ease the transition. But this time, Lafley is both the old guard and the new guy; apparently there is no one at P&G worthy of being named successor — a huge problem for a company that has long taken pride in its succession planning process.
One person who is happy about the change is Bill Ackman of Pershing Square Capital Management, the money manager who took a $2 billion stake in the company in 2012 and has publicly said that McDonald was not the right man for the job. Although Ackman had advocated for an outsider, he proclaimed himself pleased to hear of Lafley’s return. “He’s not afraid of doing the right thing and doing it quickly, and he can immediately change the culture,” he says.
Can he? Some of McDonald’s own woes came directly from Lafley’s own tenure. The strategy that was so successful for P&G in the early 2000s — raising prices and boosting innovation — backfired in the recession and gave its competitors a foothold that they haven’t yet relinquished. P&G has lost significant market share, in part because its pricing was too high. And many former executives complain that the matrix structure once championed by Lafley has become slow and bureaucratic.
Says Jim Stengel, P&G’s head of marketing under Lafley: “He’s coming into a company in which a lot of what he created or accelerated is in place. Will he look at that critically? I think he will. When he’s at the top of his game he’s a great CEO.“
The other interesting question is what Lafley’s return means for the next generation of P&G leaders. Lafley is close with Deb Henretta, head of global beauty care, and Giovanni Cisarani, head of fabric care, but hasn’t worked directly with David Taylor, head of home care, and considered a rising star.
Last February 5, Lafley published a book called Playing to Win: How Strategy Really Works, in which he and coauthor and management guru Roger Martin discuss in detail how he pulled off the giant turnaround at Procter & Gamble. A few months earlier, I met with Lafley and asked why his success hadn’t lasted into McDonald’s tenure, Lafley said simply: “Strategy doesn’t last forever.”
Neither, it turns out, do CEOs.