Apple briefly flirted with the top spot on Tuesday afternoon before settling back slightly below the oil giant.
Wednesday was the first time that Apple managed to stay No. 1 after the stock market closed.
Apple's stock fell 2.8 percent to close at $363.69, which brings the iPhone and iPad maker's market capitalization to $337 billion. Exxon's stock fell 4.4 percent to close at $68.03. That gives the oil company a market cap of $331 billion.
The change of the guard took place two days after global markets saw its worst fall since 2008 as investors worried about the U.S. credit downgrade and the possibility of another recession. Exxon had been the most valuable company since 2005, and Apple only took No. 2 in May 2010 when it surpassed Microsoft Corp.
The power shift, while largely symbolic, is a substantial milestone for Apple, which has enjoyed a triumphant comeback since the 1990s, when it struggled to stay afloat before Steve Jobs returned to take the helm.
But it's not just the comeback. Gleacher & Co. analyst Brian Marshall says Apple is giving investors something that has never been seen before. Apple's numbers are huge, with nearly $30 billion in revenue in the latest quarter, for example. Yet Marshall said the 35-year-old company is "growing like a startup."
"Even in 2008 and 2009 Apple grew like a weed and the world was coming to an end," Marshall said.
Apple grew its net income 70 percent to $14 billion and its revenue 52 percent to $65 billion in the fiscal year that ended last September. A year earlier, even as other companies - though not Exxon - were reeling from the economic meltdown, Apple's earnings grew 35 percent and its revenue 14 percent.
Apple wasn't always a tech darling. The company once known as Apple Computer Inc. was on a steep decline before Jobs returned in 1997.
With Jobs as CEO, Apple dreamed up gadgets that people didn't even think they needed until they got their hands on them - or saw friends and relatives with them. There were music players, smartphones and tablet computers before Apple introduced the iPod, the iPhone and the iPad. But the Apple gadgets' sleek, minimalist design and intuitive software gave them a loyal following not just by tech geeks but the everyday consumers.
"Never underestimate the power of Joe Sixpack relative to expenditures on consumer electronics," Marshall said. People want their gadgets, especially those made by Apple, even in a recession and even as they watch their stock portfolios and retirement funds shrink.
Even so, Apple commands just a sliver of the overall smartphone and computer market. For that reason, Apple can grow at such a fast pace. "They have just a tremendous runway in front of them," Marshall said.
Exxon, which set a record in 2008 for the highest quarterly earnings by any company, has limited prospects because its growth is tethered to oil prices and new oil discovery.
Apple's growth is limited only by innovation. Investors expect it to grow as long as it keeps making products that people want. So investors are betting on Apple's stock even though it currently makes less money than Exxon.
In its latest quarterly report, Apple said stronger iPhone and iPad sales helped more than double its net income to $7.3 billion and grow revenue by 82 percent to $29 billion.
Exxon, meanwhile, posted a 41 percent increase in its second-quarter earnings to nearly $11 billion, the largest since it set a record of nearly $15 billion in the third quarter of 2008. Its revenue grew 36 percent to $125 billion.
International companies that vie for the most valuable spot include PetroChina Co., the publicly traded unit of China's biggest oil and gas company, and Petrobras, Brazil's state-controlled energy company.
In the U.S., Exxon and General Electric had been trading off the No. 1 and No. 2 spots until Microsoft surpassed them both in early 1999, at the height of the dot-com boom. By 2000, though, GE was No. 1 once again. According to data from FactSet, the three were close over the next five years, though Apple was ascending quickly. Exxon, which is based in Irving, Texas, took the top spot in 2005 and remained there until Wednesday.
Apple, which is based in Cupertino, Calif., generally introduces a new product every three years, which means something new in 2013. Marshall does not expect the company to slow down any time soon.
In fact, he expects Apple to pass yet another milestone next year, when it's likely to surpass Hewlett-Packard Co. as the world's largest technology company by revenue. In the most recent quarter, HP reported $32 billion in revenue, compared with Apple's $29 billion in its latest quarter.