"This explains why his tax plan gives hundreds of thousands in tax breaks for people earning 2.5 million, because they're only middle class," the Illinois senator told a jeering crowd of 1,800 people.
"Everyone making 2.5 million or more, raise your hands," Obama added to laughter. Nobody in the audience did.
Warren had asked McCain and Obama separately at the forum in California Saturday to "define rich."
McCain, whose wife is a wealthy brewing heiress, said "I think if you're just talking about income, how about five million."
But the Arizona senator added that his comment would be "distorted" and stressed: "The point is that we want to keep people's taxes low and increase revenues."
Obama noted McCain's proud boast that he always put the country rather than politics first, a line that the Republican has used to lambast his Democratic opponent over the war in Iraq.
"But I have to say it's not an example of putting country first when you say (President) George Bush's economic policies have shown 'great progress'," Obama said, also noting that McCain says Obama would be a "disaster" for the economy.
"Mr McCain, let me explain to you, the economic disaster is happening right now. Maybe you haven't noticed," he said.
Obama recalled the remark of McCain economic lieutenant Phil Gramm, who was forced from the campaign for calling Americans a nation of "whiners" over the economy but is now reportedly back as a key informal adviser to the Republican.
"This guy obviously does not pump his own gas, he obviously does not do his own shopping, he obviously does not pay his own bills," Obama said.
Referring to the Republicans after eight years under Bush, the Democrat said many Americans wanted to "throw the bums out."
"But American politics is never that easy. We've got to work hard, we've got to earn this election," he said.
Obama's economic offensive came at the start of his last week on the campaign trail before his party's nominating convention in Denver, with expectations high that he will soon name his vice presidential nominee.
He was introduced at the Albuquerque rally by New Mexico Governor Bill Richardson, who is considered to have an outside chance of being named to Obama's ticket.
The Democratic standard-bearer did not comment on the feverish speculation, but did pay fulsome tribute to Richardson, a former energy secretary and UN ambassador.
"He's done so much, he can't fit everything on one resume," Obama said, calling Richardson "one of the finest public servants of our generation."