Addressing the General Assembly for the first time, Mr Bush said no country could be neutral at a time when terror groups were reported to be seeking weapons of mass destruction.
Those who supported terrorism, he said, were guilty by association and would pay a price.
But Mr Bush was warned by a long-standing foe - Iran - and an ally - Pakistan - that its military campaign in Afghanistan may increase support for terrorism.
He also urged the Northern Alliance forces, who now control the key town of Mazar-e-Sharif and are hoping to push south, not to enter Kabul.
In other developments:
President Mohammad Khatami of Iran, addressing the General Assembly shortly after Mr Bush, condemned the 11 September attacks in the United States as "inhumane" and "un-Islamic".
Violence not justified
But he added: "Resorting to violence and revenge to counter such acts can hardly be justified under ethical and humane considerations."
Mr Khatami said a definition of terrorism should include Israeli actions against Palestinians, such as occupying Arab territory, expelling people from their homes and killing civilians.
Mr Bush also addressed the conflict in the Middle East, reiterating the support for a Palestinian state that he first expressed in the aftermath of 11 September.
Pakistan's President, Pervez Musharraf, said extremists thrived in environments where millions of people - such as the Palestinians - suffered injustice.
He said a three-pronged strategy was needed, hunting individual terrorists, targetting their organisations and resolving major conflicts in a just manner.
He said a solution also had to be found for the disputed territory of Kashmir - claimed by both Pakistan and India.
Nuclear threats
General Musharraf also offered talks with India on nuclear and conventional arms in an effort to calm tensions in South Asia which correspondents say have increased since the 11 September attacks on the United States.
But he said he did not believe that Osama bin Laden's al-Qaeda network had acquired nuclear arms.
Mr Bush said the Taleban's days were "drawing to a close". He promised the US would "work to build a post-Taleban government that represents all of the people" of Afghanistan after the current regime was destroyed.
Strength and anger
The BBC's UN correspondent Greg Barrow says Mr Bush delivered a strong speech punctuated by anger.
"Terrorists cannot hide behind Islam. They encourage murder and suicide in the name of a religion that forbids both," he said.
Annan priorities
In his address to the General Assembly, UN Secretary General Kofi Annan, said there was now a temptation to focus all of the world's energy on the struggle against terrorism.
But he warned that this would give victory to terrorists.
Mr Annan, defined four issues on which he believed the UN should concentrate its greatest efforts.
These were the eradication of poverty; the fight against Aids and other preventable diseases; resolving armed conflicts; and protecting the environment.
Opening the annual debate at the UN General Assembly, Mr Annan said Africa was the continent where each of these issues faced its biggest challenge.
He said the common thread linking them was the need to respect fundamental human rights.
The 56th session of the UN General Assembly was to have opened in September but was postponed in the wake of the attacks in the US - the first time the opening has ever been delayed.
The session has been shortened to seven days from the planned 10.
Nearly 50 heads of state and government and more than 100 foreign ministers attended the opening session.