Once upon a time, Bill Miller reigned supreme as the undisputed king of mutual fund managers. His flagship fund, Legg Mason Value Trust, famously beat the market for 15 consecutive years through 2005. Morningstar crowned him as its Fund Manager of the Decade and Barron’s included him in its “All-Century Investment Team.” By 2007, he oversaw more than $70 billion at Legg Mason, transforming the sleepy Baltimore firm into a financial powerhouse. Then, in one catastrophic year, everything came tumbling down.

When the financial crisis wreaked havoc in 2008, Miller was terribly exposed to some of the worst-hit areas of the market. Contrarian as ever, he continued to buy beaten-up financial stocks as they crashed, accentuating the damage to his portfolio. His holdings included toxic stocks such as AIG, Bear Stearns, Merrill Lynch, JP Morgan Chase, Freddie Mac, and Countrywide Financial. Legg Mason Value Trust plunged 55 percent in 2008, devastating his spectacular long-term record. His smaller fund, Legg Mason Opportunity Trust, fared even worse, falling 65 percent. Investors fled in droves, and Miller says his assets under management dropped by 90 percent from peak to trough.

His own finances took a beating, too. Before the crisis, he had gone through an amicable but expensive divorce. That had wiped out “half of my net worth,” he says, “and because I’m always on margin, I lost 80 percent of that half in the collapse.” Still, he was remarkably sanguine about these personal losses. The son of a taxi driver, he had grown up in a family “without any money…. It was a treat on your birthday if you went to Burger King.” And, he says, “It’s not the end of the world if you’re not rich. Most people in the world aren’t rich. So that didn’t affect me.”

It was worse for many of his colleagues. More than 100 of them were laid off as his funds’ assets dwindled—a direct result of his own investment mistakes. “I wish I could blame someone else, but I can’t,” says Miller. “That was the worst part of it: losing money for clients, and people losing their jobs because I screwed up.” Racked by stress, he put on 40 pounds, thanks to a diet rich in cheeseburgers and Chinese food. “I wasn’t about to eat salmon and broccoli every night,” he jokes. “There’s only so much pain I can take, and I drew the line there.”

Yet what stands out most is Miller’s resilience in the face of adversity. As the market imploded, he didn’t hide in a corner, nursing his wounds. He gathered all of the cash he could muster—not least, by selling his yacht—and invested it in cheap stocks that have since surged, enriching him and a loyal minority of shareholders who stuck by him. Miller says it wasn’t hard to keep buying while so many others ran for cover: “I’m contrary in the sense that paper losses, quotational losses, just leave me to think there’s more opportunity.” After all, “lower prices mean higher future rates of return. They don’t mean higher risk.”

Part of what sustained him during that trial by fire was his passion for philosophy. Miller, who had studied the subject as a postgraduate at Johns Hopkins University, says he revisited the works of stoic philosophers such as Epictetus and Seneca during the credit crisis. He drew strength from their “general approach to misfortune. Basically, you can’t control what happens to you. You can control your attitude towards it.” He also took solace from Thoughts of a Philosophical Fighter Pilot, an extraordinary book by Vice Admiral James Stockdale, who was tortured as an American prisoner of war in Vietnam.

Sometimes, Miller wishes he had listened to his ex-wife and retired at the pinnacle of his success. She wanted him to quit so they could travel the world. “That would have been a smart thing to do,” he concedes. But the truth is that he still relishes the investing game, even though he has ceded control of his biggest fund, Legg Mason Value Trust. Competitive as ever, he delights in the fact that Legg Mason Opportunity Trust, which he co-manages, has risen more than 100 percent in just two years. He also notes with pride that Value Trust beat the market over his 30-year tenure and that Opportunity Trust has beaten the market over his 15-year tenure—even including the brutal losses of 2008.

In any case, Miller is hardly alone. Over the course of a long career, even the most brilliant investors inevitably suffer periods of dire underperformance. Miller quotes one of his favorite lines from John Maynard Keynes, who lost a fortune in the Great Depression yet lived to fight another day: “I should say that it is from time to time the duty of a serious investor to accept the depreciation of his holdings with equanimity.” If so, then Bill Miller has done his duty.