The motive that is common to al-Qaeda, ISIS, and other Islamic extremist groups is the following;
Create a government based on religion.
The extremist groups like al-Qaeda and ISIS believe that they are fighting in the name of Islam and the Islamic teachings. They want to create a government on the basis of the Sharia law.