"Celeb", a 30-second ad that is set to air in 11 battleground states in the US, features images of Obama on his trip to Europe last week interspersed with videoclips of pop star Britney Spears and socialite Paris Hilton.
A voiceover says: "He's the biggest celebrity in the world... but is he ready to lead?"
The ad also highlights Obama's opposition to off-shore oil drilling and claims that he will raise taxes if he is elected.
Campaigning in Missouri, Obama said that he had noticed McCain had nothing very positive to say about himself. He said: "He seems to be only talking about me. You need to ask John McCain what he is for, not just what he's against."
Steve Schmidt, the McCain senior adviser behind the ad, also worked in 2004 for George W Bush, whose campaign made repeated attacks on rival John Kerry.
The Obama camp quickly hit back with an ad called "low road" accusing McCain of "practising the politics of the past" and connecting him with George W Bush.
Over the past week, McCain has increased his attacks on Obama, suggesting that he would be willing to lose the Iraq war in order to win the election and criticising him for skipping a meeting with injured US troops in Germany because he couldn't bring TV cameras along. All of the charges have been strongly disputed by the Obama campaign and criticised by independent fact-checking organisations.
Many Republicans, including John Weaver, McCain's former campaign manager, have described the new ad as "childish" and expressed concern that it will jeopardise McCain's reputation.
Mark Penn, head of strategy for Hilary Clinton and the man behind her "3am red phone" ad, said that McCain's ads are not particularly effective.
Read all about the US presidential election in Darren Davidson's Electioneering Stateside blog, where you can watch all the election ads.