FORTUNE – There’s unfiltered, there’s unvarnished, and then there’s Mike Saylor.
He’s the 47-year-old archetype of dotcom-era lunacy and the CEO of MicroStrategy (MSTR), a midsize business-intelligence software company based in the suburbs outside Washington, D.C. At lunch we’ve been discussing his company’s record revenues, his fascination with Facebook (FB), his personal comeback, his new book, and the ignominy of being a Trivial Pursuit punch line — at least when he’s not scowling at the waiter about the cold fish and chips.
Then Saylor’s cellphone rings. It’s his stockbroker, who wants him to approve a multimillion-dollar wire transfer of Qualcomm (QCOM) shares. Exasperated, Saylor lets loose. “Just what transaction do you want me to authorize?” he barks. “You’re wasting my time!” The broker tries to get a word in. “This is archaic!” Saylor goes on. He hangs up and turns to me: “He had to interrupt me at 3:15 — but he could have done it in a way that allowed me to authenticate the documents without bothering me!” Saylor is agitated by both the stupidity and the lost opportunity. “It could have been a two-second transaction by me clicking ok on my iPhone. If they had harnessed the power of a mobile network, they would’ve dropped the cost of that transaction by 99%!” Even the waiter’s afraid to come by the table now.
We’ve just witnessed the MO of onetime wonder-boy entrepreneur Michael J. Saylor. His eccentricities — the zeal for data analysis as the cure for ignorance, the eight-hour peroration at employee orientation, the unpunctuated disquisitions on everything from economics, science, and philanthropy to Caesar, Churchill, and Steve Jobs — are notable enough. Yet high-tech history records his name for an altogether different reason. Once upon a time, at 35, he was the richest person in the D.C. area, worth some $15 billion. Then, after an accounting controversy in 2000, MicroStrategy’s stock collapsed. In a single day he personally lost $6.1 billion, making him the biggest financial loser in the history of the world — and earning him the dubious distinction of being the answer on the back of a Trivial Pursuit 20th Anniversary Edition card.
Such ruination would have defeated most people. And Saylor admits being adrift for a few years, which tends to happen when the New York Daily News plasters your inglorious mug on the front page and you get phone calls from shareholders advising you to “burn in hell.” But Saylor persevered. The rise of mobile platforms made him believe that his dream was finally coming true: vast databases, instantly accessible to companies mining them, with MicroStrategy as a conduit to hidden knowledge. In the economic and social transformations wrought by mobile technology, Saylor imagined his own rebirth. And as the business cycle rumbled on, MicroStrategy became a vital player in so-called business intelligence, one of the buzziest niches in technology.
No less a corporate star than Facebook is now buying into Saylor’s vision. A few years ago Saylor approached its new COO, Sheryl Sandberg — whom he knew from her days serving in the Clinton administration — and offered free MicroStrategy software for three years. He thought Facebook, at heart, was going to be a data-driven company and ridiculed other CEOs for thinking it a “stalker tool.” Saylor’s tactic worked with Sandberg. According to a person with direct knowledge of the MicroStrategy-Facebook relationship, MicroStrategy has become part of the social network’s infrastructure — an out-of-sight but essential plumber that keeps information flowing internally. MicroStrategy software helps Facebook employees share useful information, letting salespeople know how much revenue each has produced, for instance.
Facebook would like to do more with that data — ideally, to generate revenue. Because of its unstructured array of information about companies — Coca-Cola (KO) had 42,267,559 fans at the end of May, and 22,051,080 people “liked” Skittles — Facebook wants the ability to learn not merely the gender, location, and age of those individuals, as well as their friends, but their favorite brands too. MicroStrategy wants to help. These days MicroStrategy engineers have decamped to Facebook headquarters in Silicon Valley to write software that allows Facebook to better extract meaning from its social graph and thereby gain another tool to attract advertising — or help companies better understand their own fans. When companies can integrate their own customer data with Facebook’s social graph, MicroStrategy can pitch companies that it can develop sophisticated marketing, sales, and loyalty applications.
Though Facebook continues to be among MicroStrategy’s million-dollar customers, neither company would comment on what both call a confidential project. Nor would they discuss privacy issues involved with mining information created by Facebook users.
MicroStrategy already makes available an addictive, free analytic tool on Facebook, as well as on the iPhone and iPad, called Wisdom. The crowd-sourcing app lets users discover what the individuals in their own social networks, as well as millions of registered fellow Facebook users, eat, read, want, and watch. The data are made anonymous, but if you’re a friend of somebody who downloaded the Wisdom app, by virtue of your friendship your predilections become part of Wisdom’s dashboard. So I learned that, as of May, the favorite book of college-educated female Mitt Romney fans on Facebook was the Bible, their favorite company was Target (TGT), and their favorite place to eat was Subway; the same demographic of Barack Obama fans best liked works by Maya Angelou, Starbucks (SBUX), and also Subway. Brand managers will crave such leads.
Saylor co-founded MicroStrategy in 1989 as a 24-year-old star two years out of MIT. Within a few years MicroStrategy had 50 employees, and Saylor was winning over Fortune 500 customers. Those companies were paying hundreds of thousands of dollars a year for software that allowed them to organize their databases into easy-to-read charts and grids. Saylor’s software famously told Victoria’s Secret executives to stock more black bras in New York and bigger ones in Chicago.
When it went public in 1998, MSTR — right after Microsoft’s (MSFT) on the ticker — doubled on its first morning. The MicroStrategy culture was notorious: Every winter Saylor took all employees on a weeklong festive, spouse-free Caribbean cruise. It was said that Saylor resembled Tom Cruise, maybe dated Queen Noor, and had a butler named Brian. MicroStrategy and its CEO were darlings of the tech boom until the accounting mess.
On March 20, 2000, the company was forced to restate two years of revenue and earnings going back to the IPO. The stock plunged. The SEC filed civil charges of accounting fraud, and Saylor, along with other executives, quickly settled (without admitting wrongdoing). In barely two years MicroStrategy stock lost 98% of its value; a third of the workforce of 2,800 was laid off. Saylor bid au revoir to the national spotlight — and to his plans for a 50-acre Versailles-on-the-Potomac compound that was to include a French neoclassical mansion and a golf course.
If not entirely chastened about his company’s near-death experience, Saylor says he’s more cautious now. “A 24-year-old thinks they can do 10x more than they can,” he says, sounding almost measured. MicroStrategy no longer has much debt, it provides no guidance on financials, and it no longer grants options to its 3,000 employees. No more Caribbean cruises either. The company’s image on Wall Street has been partially restored. At the end of May it had a market cap of $1.3 billion — nowhere near its $26 billion peak, but 30 times more than when it hit bottom. In 2011 it had record revenues of $562 million, up 24% from the prior year; in the first quarter of 2012, revenues were $145 million, up 19% from last year. MicroStrategy has thousands of customers, including the four largest U.S. commercial banks, nine of the 10 largest pharmaceutical companies in the world, and nine cabinet-level departments of the federal government.
Saylor wants to be seen not merely as a successful CEO but as a thought leader. The showpiece in his efforts is The Mobile Wave: How Mobile Intelligence Will Change Everything, his paean to technology, published in June. His publisher breathlessly places it “in the tradition of international bestsellers Future Shock and Megatrends.” Perhaps. It is a thoughtful romp across invention and innovation — and blessedly free of MicroStrategy sales pitches. “Whenever teenage girls and corporate CEOs covet the same new technology, something extraordinary is happening,” writes Saylor, who never parts with his own iPad and iPhone. Among his predictions: Cash will disappear; Harvard as we know it will disappear; children will get phone numbers at birth, which will become “universal identifiers”; and land and capital will become liabilities.
Funny thing is how much Saylor still seems to like some of the finer things that come with land and capital. Though no longer a billionaire, Saylor is still worth hundreds of millions of dollars. When I visited his office in Tysons Corner, Va., the only thing on his desk was a thick loose-leaf binder marked “Villa Vecchia,” suggesting Saylor may be in the market for the $19.8 million colossus on Millionaire’s Row in Miami. And there’s also the corporate jet and the three motor yachts — including the magnificent 147-foot Dutch-built Harle, which spends a lot of time in Monaco and features a giant hot tub on the top deck. As Saylor likes to say, “A man’s got to know his limitations.” Or not.
This story is from the July 12, 2012 issue of Fortune.