NEW YORK (Fortune) -- Ken Lewis doesn't have a golden parachute, but he's all set for a comfortable landing -- unlike his long-suffering shareholders.

The Bank of America (BAC, Fortune 500) chief executive officer said Wednesday he'll step aside at year-end after eight years at the helm. Based on the company's most recent proxy statement, he will have $53 million in pension benefits waiting for him when he leaves.

That should give him about $3.5 million a year in pension payouts for the rest of his life -- at a time when people who bought the stock when he took the reins in 2001 are underwater on their investments.

Although the bank swore off employment contracts and eliminated golden parachutes seven years ago, Lewis can thank a pension plan that dates back decades for his rich retirement rewards.

While this plan was open, certain top executives were eligible to accrue benefits they would receive following retirement in the form of annuity payments.

Lewis was the biggest winner in these plans, but other BofA execs benefited as well. Vice Chairman James Hance, for instance, retired in 2005 with an indicated annual benefit of $2.7 million.

Ironically, BofA decided to freeze this so-called supplemental executive retirement plan at the same time it got rid of golden parachutes, citing the need to better align executive compensation with investor returns. By any measure, those have been poor at BofA of late.

The company's stock fetches less than half its year-ago price and remains below its level when Lewis took over in April 2001 -- even after a 563% jump off lows from this March.

But before BofA made its compensation switch, Lewis had participated for more than a decade in the supplemental pension plan -- racking up the more than $50 million supplemental plan account.

That's not all. Lewis also has $10 million in deferred compensation owed to him and another $8 million in restricted stock and stock options as of Dec. 31 that will continue to vest over coming years, according to the most recent proxy filing. BofA referred questions about Lewis' retirement plan to those filings.

Assessing a total value on Lewis' walking-away pay is an inexact science, given changes in BofA's stock price and other factors.

But Paul Hodgson, senior research associate at the Corporate Library governance tracker, said his firm's most recent survey of retirement plans puts Lewis' take at $64 million.

That number is down by more than half from 2006, when BofA shares traded above $50, compared with a recent $16.21. But it still "puts him in the top 40" nationwide, Hodgson said.

Not that Lewis should need the money. Though his cash salary has been $1.5 million annually since he took the reins in 2001, he has managed to chalk up $63 million in pay and perks over the past three years, according to filings -- including almost $10 million last year, which ended with Lewis bickering with federal officials over the terms of its purchase of brokerage Merrill Lynch.

In the end, the U.S. backed BofA's purchase of Merrill -- but at a steep cost to Lewis' standing with shareholders, who stripped him in April of his chairmanship, prompting numerous critics to start the countdown to his departure.

"Ken Lewis's resignation as CEO is the overdue but inevitable result of the overwhelming shareholder opposition registered at Bank of America's 2009 annual meeting," the CtW Investment Group, long a vocal critic of Lewis' leadership, said in a statement Wednesday evening. "The onus is now on the board of directors to engage with shareholders to name a successor who can quickly restore the bank's credibility with investors, regulators and Congress."

Lewis' decision to throw tens of billions of shareholder dollars at Merrill when it was on the brink of collapse even drew chortles from the likes of Warren Buffett, the billionaire investor who last month dubbed Lewis the "ironic hero" of the meltdown.

But with BofA shares down two-thirds from their 2006 highs, Lewis will depart as no hero to investors -- ironic or otherwise.

Correction: An earlier version of this story misstated the name of the Corporate Library, a corporate governance watchdog, and the title of senior research associate Paul Hodgson.