The singer-songwriter issued a statement through her spokeswoman after a YouTube video of her giving her support to the incumbent in the 2012 US presidential election emerged.
"It's so amazing and incredible to think that we have an African-American in the White House," she said.
"Y'all better vote for f**king Obama. For better or for worse, alright, we have a 'black Muslim' in the White House, OK?
"That's some amazing s**t. It means there is hope in this country. And Obama is fighting for gay rights, okay, so support the man goddammit."
Her official clarification read: "I was being ironic on stage. Yes, I know Obama is not a Muslim - though I know that plenty of people in this country think he is. And what if he were?
"The point I was making is that a good man is a good man, no matter who he prays to. I don't care what religion Obama is - nor should anyone else in America."
The 44th president of the United States, Obama was born in Hawaii and describes himself as a "devout Christian", being baptized in 1988.
Some conspiracy theorists have claimed that the president is in fact secretly Muslim, while others have suggested that he was not born in the US.
Madonna's most controversial moments:
Copyright: Rex Features Everett Collection/Rex Features