"It wouldn't make us more safe, it would make us less safe, fueling ISIL's notion that the West hates Muslims," Obama said, using an acronym for Islamic State.
He also defended the government's efforts to detect extremists who may be plotting attacks like the one in Orlando and disrupt them.
"We work to succeed 100 percent of the time," Obama said on Tuesday after meeting with his national security advisers to discuss U.S. efforts to combat Islamic State extremists. "An attacker, as we saw in Orlando, only has to succeed once. We are all sobered by the fact that despite the extraordinary hard work, something like Orlando can occur."
The meeting was planned before 29-year-old gunman Omar Mateen attacked revelers at the Pulse nightclub on June 12. It is one of a series Obama has convened in recent months to discuss the fight against Islamic State.
Mateen declared allegiance to the leader of Islamic State before carrying out his attack, the FBI said. But he also professed support for other terrorist groups including Hezbollah and al-Nusra, which are at odds with each other and with Islamic State.
Obama has said there is no indication that Mateen was directed by foreign terrorists. He said on Tuesday that Mateen was "angry" and "disturbed" and had "become radicalized."
The people vying to succeed Obama in office, Republican Donald Trump and Democrat Hillary Clinton on Tuesday proposed disparate solutions for the problem of lone-wolf terrorist attacks like Mateen's.
Trump called for a ban on immigration from countries "tied to Islamic terror" and closer monitoring of mosques in the United States.
Clinton called for tighter controls on gun purchases, especially for those who are suspected of being extremists.
Obama has also urged stricter gun laws, including outlawing civilian sales of military-style rifles used by Mateen and the perpetrators of previous mass shootings.
Earlier on Tuesday, Secretary of the Department of Homeland Security Jeh Johnson said that gun violence has become a national security issue.
"I do believe that meaningful, responsible gun control is now part and parcel of homeland security," Johnson said Tuesday in an interview on "CBS This Morning."
Obama's meeting at the Treasury Department focused on cutting off funding for extremist groups like Islamic State. Clinton said Monday that it's "long past time" for leaders in countries like Saudi Arabia, Qatar and Kuwait to prevent their citizens from providing money and support to the terrorist group.
Saudi Arabia's Deputy Crown Prince Mohammed bin Salman is in Washington this week for meetings with U.S. officials. It's not clear if Obama will meet with him.
Obama said the campaign against Islamic State is succeeding, as the group loses territory in Syria and Iraq. He said the ranks of the group's fighters has been reduced to its lowest level in more than two years. "The flow of foreign fighters including to Iraq and Syria has plummeted," he said.o the United States.