At the end of a summit in Northern Ireland, the leaders also called for an agreement on a Syrian transitional government "formed by mutual consent", and said the military and security services "must be preserved and restored" in a future set-up.
The G8, including President Bashar al-Assad's key ally Russia, said it was deeply concerned by the "growing threat" from terrorism and extremism in Syria.
The world powers called on the Syrian regime and the opposition to "commit to destroying and expelling from Syria all organisations and individuals affiliated to Al-Qaeda, and any other non-state actors linked to terrorism".