Beset by an Internet-fueled whispering campaign, and suggestions that he and wife Michelle do not embrace overt US patriotism or heartland American values, Obama spoke out days before July 4 Independence Day celebrations.
"The question who is or is not a patriot, all too often poisons our political debates in ways that divide us," Obama said, declaring America the greatest country in the world, in a speech in Independence, Missouri.
"Throughout my life, I have always taken my deep and abiding love for this country as a given," Obama said.
"At certain times over the last sixteen months, I have found, for the first time, my patriotism challenged -- at times as a result of my own carelessness, more often as a result of the desire by some to score political points and raise fears about who I am and what I stand for.
"I will never question the patriotism of others in this campaign, and I will not stand idly by when I hear others question mine."
Obama also argued that patriotism could be manifested in political dissent, rather than knee-jerk support of the US government, and warned that some people who questioned the patriotism of opponents of the Iraq war were out of line.
"Surely we can agree that no party or political philosophy has a monopoly on patriotism.
"Surely we can arrive at a definition of patriotism that, however rough and imperfect, captures the best of America's common spirit."
"Dissent does not make one unpatriotic," the Illinois senator, 46, said against a backdrop of US flags.
Obama has faced frequent questions because he has not always worn a US flag lapel pin during campaign appearances throughout the country.
Earlier this year, Michelle Obama sparked a political firestorm when she said that her husband's campaign had left her "really proud" of her country for the first time in her adult life.
Republican candidate John McCain's wife Cindy quickly hit out at the comments at the time, saying she had always been proud of her country, and reignited the row again in an interview with ABC News on June 17.
"I don't know why she said what she said. All I know is that I have always been proud of my country," Cindy McCain said in Vietnam where she was visiting a US charity.
Obama himself provided critics with ammunition to suggest that he was elitist and not in tune with basic US values, in remarks to a fundraiser in liberal San Francisco in April about working class voters.
"It's not surprising, then, they get bitter, they cling to guns or religion or antipathy to people who aren't like them or anti-immigrant sentiment or anti-trade sentiment as a way to explain their frustrations."
The Obama campaign last month debuted a new website at www.fightthesmears.com to combat slurs against the Democratic hopeful, the son of a white American woman from Kansas and a black father from Kenya.
Obama's main campaign website already has a fact-check section to refute incorrect rumors such as that the Christian candidate is a secret Muslim.