Praise be to Allaah.
It was narrated that the Prophet (peace and blessings of Allaah be upon him), said to his companions when they returned from a military campaign, “We have come back from the lesser jihaad to the greater jihaad.” They said, “Is there any greater jihaad than jihaad against the kuffaar?” he said, “Yes, jihaad al-nafs (jihaad against the self).”
This hadeeth is not saheeh.
Undoubtedly jihaad against the self comes before jihaad against the kuffaar, because one cannot strive against the kuffaar until after one has striven against one’s own self, because fighting is something which the self dislikes. Allaah says (interpretation of the meaning):
“Jihaad (holy fighting in Allaah’s Cause) is ordained for you (Muslims) though you dislike it, and it may be that you dislike a thing which is good for you and that you like a thing which is bad for you. Allaah knows but you do not know”[al-Baqarah 2:216]
The point is that jihaad against the enemy cannot take place until one strives and forces oneself to do it, until one’s self submits and accepts that.
Fataawa Manaar al-Islam by Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him), 2/421
Ibn al-Qayyim said: “Jihaad is of four stages: jihaad al-nafs (striving against the self), jihaad al-shayaateen (striving against the shayaateen or devils), jihaad al-kuffaar (striving against the disbelievers) and jihaad al-munaafiqeen (striving against the hypocrites).
Jihaad al-nafs means striving to make oneself learn true guidance, and to follow it after coming to know it, calling others to it, and bearing with patience the difficulties of calling others to Allaah. Jihaad al-Shaytaan means striving against him and warding off the doubts and desires that he throws at a person, and the doubts that undermine faith, and striving against the corrupt desires that he tries to inspire in a person. Jihaad against the kuffaar and munaafiqeen is done in the heart and on the tongue, with one’s wealth and oneself. Jihaad against the kuffaar mostly takes the form of physical action, and jihaad against the munaafiqeen mostly takes the form of words… The most perfect of people are those who have completed all the stages of jihaad. People vary in their status before Allaah according to their status in jihaad.”(Zaad al-Ma’aad 3/9-12)
And Allaah knows best.