Morgan Stanley’s happy Facebook anniversary

FORTUNE — Nearly a year ago, James Gorman sat in a chair on his firm’s trading floor, clipped on a microphone and stared into a camera. For Morgan Stanley’s CEO, it was Facebook judgment day.

Next to him was CNBC’s Maria Bartiromo. Gorman had agreed to the interview weeks before, back when the Facebook IPO still looked like it was going to be blockbuster, not the bust it turned out to be. But Gorman decided to go ahead with the interview anyway. From the moment it started, though, it was apparent he shouldn’t have. The lighting was bad. Gorman looked uncomfortable. He was unapologetic and combative. Gorman called individual investors who had lost money on the IPO “naive.” Never mind the fact that Morgan Stanley and Facebook (FB) had made a killing on the deal.

But it wasn’t just the fallout from Facebook that was dogging the CEO. Gorman was also facing a looming credit downgrade, an increasingly bitter fight with Citigroup (C) over the price of his Smith Barney acquisition and a growing revolt among the brokers that he was now being bullied into paying up for. A number of observers predicted Gorman would be out within a few months.

CNNMoney: Missed out of Facebook IPO and couldn’t be happier

But that’s not what happened. May 18 will be the one-year anniversary of the Facebook IPO. Gorman still holds the top job at Morgan Stanley (MS) and now looks closer than ever to pulling off the turnaround many thought would allude him. Morgan Stanley’s shares are up 81% in the past year to a recent $25.

A number of top investors have been buying shares recently, including Wellington Management and T. Rowe Price (TROW). At its annual meeting on Monday, Morgan Stanley faced little opposition to its executive compensation plan, or the reelection of its board. And unlike at JPMorgan Chase (JPM), there has been no talk of splitting the CEO and chairman position. CLSA bank analyst Mike Mayo, who back in September said Gorman was likely to go, this week upped his estimate for the shares to $36 largely on Gorman’s plan to boost the company’s profits.

“He’s been brilliant on the acquisition and execution of Smith Barney, and the credit rating issue was solved quickly,” says John Mack, who was the prior CEO of Morgan Stanley. “I give him high marks, and these are not easy markets to navigate.”

Nearly every big issue facing Gorman a year ago has gone Morgan Stanley’s way.

Gorman convinced Moody’s to downgrade the company’s debt rating two notches rather than an expected three, saving the bank nearly $3 billion. And Gorman has forced the firm’s bankers and traders to sell off risky assets. The result is that investors are more comfortable with Morgan Stanley’s debt than they were a year ago before the downgrade. It now costs $119,000 to insure $10 million of Morgan Stanley debt for five years. That’s down from $451,650 a year ago.

Perella Weinberg, the third-party adviser brought into value Smith Barney, handed another victory to Gorman, mostly siding with Morgan Stanley, cutting the price of the deal by as much as $8.5 billion. And, while the job’s not done winning over his new employees, there’s been no major exodus of Smith Barney brokers.

The Facebook IPO has taken Morgan Stanley’s vaunted technology team down a notch. Morgan Stanley was forced to pay a $5 million fine related to the deal. Morgan Stanley ranked 6th in the past year as lead underwriter of technology IPOs, according to Dealogic. That’s down from No. 1 in the year before Facebook. But when it comes to overall U.S. investment banking fees from tech deals, which also includes mergers and acquisitions and non-IPO stock offerings, Morgan Stanley still ranks No. 1.

MORE: Morgan Stanley rides debt wave

Mack says it’s unfair to blame Gorman or any of Morgan Stanley’s other bankers for the Facebook flop. A year later, the shares, which went public at $38, still only fetch $26.”There were a number of us who said don’t price it there,” says Mack. “But the Facebook issue was so oversubscribed.”

Mack says Facebook wanted to sell the shares. So Morgan Stanley bankers figured if someone was going to underwrite the extra shares, it might as well be them. Even so, Mack says in the end he believes it was the glitch at the Nasdaq, which delayed trading and caused problems throughout the day of the IPO that ultimately did in the deal.

Gorman declined to comment for this story. Following the first quarter, in which the firm made nearly $1 billion after losing money last year, Gorman said that he thought many of the firm’s biggest issues were behind it.

Still, it’s too soon for Gorman to fly the “mission accomplished” banner. The better earnings in the first quarter still missed analysts’ expectations. Hedge fund manager Dan Loeb, who bought 7.6 million Morgan Stanley shares and said he expected the stock price to double, recently revealed in a regulatory filing that his firm Third Point sold its entire stake in the first quarter. Loeb declined to comment. The firm’s return on equity has climbed recently to 7.6%, but it is still well below where it was before the financial crisis. And Morgan Stanley’s bond trading business significantly lags long-time rival Goldman Sachs (GS) as well as others.

MORE: A hole in JPMorgan’s Dimon defense

But part of that is by design. While not abandoning the bond market, Gorman has resisted calls to double down on the business. Instead, he has continued to cut staff — he has already eliminated another 1,600 position this year firm-wide — and has explored ways to automate more of its bond trading in order to lower costs. And Gorman has been more aggressive than his peers in reining in Wall Street pay. This year for the first time Morgan Stanley deferred 100% of its year-end bonuses, paying them out in restricted stock rather than upfront cash. Gorman said the move might anger some bankers, but he thought they would stay. His bet has paid off. There have been few defections. The rising stock price has of course helped.

It’s all part of Gorman’s plan to shift the firm towards asset management, which produces consistent reoccurring revenue once you have gained the accounts, and away from Wall Street’s more volatile and risky businesses. That bet now seems to be paying off. After stagnating for the first part of the economic recovery, profits at Morgan Stanley’s brokerage division, now mostly combined with the Smith Barney acquisition, are starting to rise. And while the firm’s ROE might not be going back to where it used to be, many investors think Morgan Stanley will be more richly rewarded for its more stable mix of businesses.

“The fee business is a lot bigger than it used to be, and with the stock market ramping back up, that should be good for investment banking as well,” says David Steinberg, who was a Morgan Stanley broker for 15 years and now runs money management firm DLS Capital. He says he has been looking at buying the stock but hasn’t yet. “Gorman has gotten most of the termites out of the woodwork. It’s a lot lower risk than it used to be.”

Last year, at the firm’s annual meeting, Gorman was interrupted by some anti-Wall Street protestors who accused Morgan Stanley of unfair foreclosure practices, condoning excess Wall Street pay and using lobbyists to thwart financial reform efforts. At one point Gorman said he takes “umbrage at the suggestion that our board did anything unethical, and I can’t just let that sit out there.” But Gorman, nonetheless, calmly took questions from protestors and other investors for more than an hour.

Gorman told a reporter from Reuters that, all things considered, “I thought that it was pretty smooth.” He was talking about the meeting, but it turned out to be a pretty good prediction for the year ahead.

Subscribe to Well Adjusted, our newsletter full of simple strategies to work smarter and live better, from the Fortune Well team. Sign up today.