The Council of Senior Ulema, a group of top Muslim scholars, said it was prohibited under Islamic sharia law to join the fighting.
It called for the prosecution of "inciters" involved in recruiting militants to join the conflicts in Iraq and Syria.
"Terrorism... Has nothing to do with jihad (holy war) in the name of Allah. Islam has nothing to do with this deviant doctrine," the council said in a statement.
The council's head, Grand Mufti Sheikh Abdul Aziz al-Sheikh, last month branded Al-Qaeda and the Islamic State (IS) extremist group "enemy number one" of Islam.
Also Read
The religious council's stance reflects the Saudi clerical community's hostility towards IS jihadists, known for their brutality.
IS fighters -- already well established in Syria -- have seized vast swathes of Sunni territory in neighbouring Iraq since June, and have carried out beheadings and other atrocities.
The council said "terrorist acts" carried out by Shiite movements such as Lebanon's Iran-backed Hezbollah, Yemen's Huthi rebels and Iraq's Asaib Ahl al-Haq were also prohibited and "criminal".
Fifteen of the 19 hijackers who took part in the September 11, 2001 attacks on the United States were from the kingdom.
After the attacks, Saudi Arabia came under criticism from the US State Department over the lack of religious freedom in its school textbooks, and was accused of promoting intolerance.
Saudi authorities have long feared a backlash from jihadist groups, particularly after a spate of Al-Qaeda attacks in the kingdom from 2003 to 2006.