The move appeared to signal a new approach for Obama, who has previously said each state should decide for itself on the question of same-sex marriage, but avoided specific endorsement or condemnation of individual pieces of legislation.
"While the president does not weigh in on every single ballot measure in every state, the record is clear that the president has long opposed divisive and discriminatory efforts to deny rights and benefits to same sex couples," said Cameron French, Obama's campaign spokesman for North Carolina.
"That's what the North Carolina ballot initiative would do, it would single out and discriminate against committed gay and lesbian couples. And that's why the president does not support it," he said.
The ballot measure - Amendment One - was passed by the state legislature and would mandate that "marriage between a man and a woman is the only domestic legal union that shall be valid or recognized in this state." Advocates say the language also effectively bans civil unions and domestic partnerships, for which Obama has previously expressed support.
The Human Rights Campaign, the nation's largest gay rights group and Obama ally, praised the outspokenness by the president ahead of the general election campaign in what is a key swing state.
"The president has made clear the importance of protecting all families," said Human Rights Campaign President Joe Solmonese in a statement. "Amendment One undermines basic human dignity and places families of all types at risk in North Carolina."
Obama remains personally opposed same-sex marriage, but is said to be "evolving" on the issue.
"I think it's important for us to work through these issues because each community is going to be different, each state is going to be different," he said in June after New York became the sixth and largest state to legalize same-sex marriage. Washington state recently became the seventh.
He had declined to specifically take a position on the issue as it was under debate in both New York and Washington. The president has opposed the federal Defense of Marriage Act and opposes a federal marriage amendment to the Constitution.
Obama won North Carolina by the narrowest margin of any state in the 2008 election, and it's expected to be more hotly contested in 2012. His supporters believe the same-sex marriage ballot measure in North Carolina may help mobilize Democratic voters to turn out in November.