Wa `Alaykum As-Salam Wa Rahmatullah Wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All thanks and praise are due to Allah and peace and blessings be upon His Messenger.
Dear questioner, thanks for your good question that reflects deep interest in understanding the teachings of Islam.
As regards your question, Dr. Taha Jabir Al-`Alwani, president of the Graduate School of Islamic and Social Sciences and president of the Fiqh Council of North America, states the following:
“The origin of Sufism is traced back to the first century of Hijrah when some of the Companions and the Successors tried to stay away from everything they got after they conquered Iraq, Egypt, Syria and the other countries. Some of them decided to continue as Mujahidin or fighters for the Sake of Allah or to be busy themselves with acts of worship and serving the Muslim Ummah in teaching or some other service in different parts of the life. At that time they were given the title Az-Zuhhad (sing. Zahid). Zahid means the person who dislikes to have excessive approach to that which is lawful because he is afraid that this would lead him to some kind of negligence in observing acts of worship.
After that, Sufism, like any other part of knowledge and activities, grew up and a lot of the Sufis like Abul Qasim Al-Junaid al-Baghdadi practiced it. People like Al-Junaid and many others became examples for any person who wants to purify himself and prepare himself for the Hereafter.
After the fourth century of Hijrah, Sufism was divided into two kinds;the Sunni Sufism and the Bid`i (Innovative) Sufism. The first one means to practice Zuhd (Asceticism) and the worship Allah according to the Sunnah of the Prophet, peace and blessings be upon him, and the way of life of his Companions.
The other kind of Sufism, however, means that kind of Sufism based on the teaching and way of life of the people who came from India and Persia and some other places to join the Muslim nation and Islam. They practiced their way of Sufism in the Muslim environment.
With this, Muslim scholars took different positions regarding Sufism. Some of them supported it and the majority of them accepted Sufism because they knew it is a part of the Sunnah and the way of life of the Rightly Guided Caliphs.
On the other hand, some other people objected some kinds of Sufism and some orders who were practicing that Innovative Sufism. We should be careful when we deal with this issue and we should judge the people and the orders according to the light of the Qur’an and the Sunnah of the Prophet, peace and blessings be upon him. We need to adopt the Sufism which was practiced by the Companions and the Rightly Guided Caliphs.”
For further information, click the following:
Islam's Stance on Sufism
Almighty Allah knows best.