"History shows that nations that uphold the rights of their people, including the freedom of religion are ultimately more just and more peaceful and more successful," Obama said at an annual National Prayer Breakfast.
"Nations that do not uphold these rights sow the bitter seeds of instability and violence and extremism.
"So freedom of religion matters to our national security."
Obama noted that there were times when he was forced to work with governments that did not meet US standards on rights, but that had agreed to cooperate on core national security interests.
More From This Section
"We do a lot of business with the Chinese... But I stress that realising China's potential rests on upholding universal rights, including for Christians and Tibetan Buddhists and Uighur Muslims."
Obama said that when he meets Myanmar President Thein Sein, who he is supporting in an effort to bring the nation also known as Burma out of isolation, he states the case for Christian and Muslim minorities.
He also called for freedom of worship in Nigeria, in South Sudan and Sudan, and said access to holy sites must be a component of the Israeli-Palestinian peace deal that his secretary of state John Kerry is chasing.
Obama also called for the release of missionaries imprisoned while proselytising their faith, including US pastor Kenneth Bae in North Korea and Iranian American pastor Saeed Abedini in Iran.
The president also hit out at what he described as extremists who stoke the fires of division to further political ends, noting particularly factions in the Central Africa Republic.
"To harm anyone in the name of faith is to diminish our own relationship with God," Obama said.
The National Prayer Breakfast is an annual event bringing together lawmakers, officials and decision makers from across party lines.