The Beginnings of Deviation
A brief essay demonstrating how the Ummah of Muḥammad (ṣallallāhu ʿalayhi wa-sallam) was originally established upon Tawḥīd, and how it gradually deviated into Shirk.
So the beginnings of Shirk lay in the excessive praise and respect given to certain dead pious Muslims, who - due to peoples’ love for them - became idols that were worshipped and supplicated along with Allāh. So what needs to be understood is why people felt that they had to worship these righteous people along with worshipping Allāh.
: MAN’S FITRAH (NATURAL DISPOSITION):
What is essential to know is that: “Allāh created the creation in order that they should worship Him. Furthermore, Allāh prepared for them - from His Provision - all that they would require. About this Allāh - the Most High - said:
“I did not create jinn and mankind, except that they should worship Me. I do not seek any provisions from them, nor do I ask that they should feed me. Indeed Allāh is the Provider, the Possessor of Might and Strength.” [Sūrah al-Dhāriyāt 51:56-58]
So the soul - if left to its fitrah (natural disposition and inclination) - would find itself acknowledging Allāh’s Divinity, loving Him and worshiping Him alone, without worshipping others along with Him. However, this fitrah becomes corrupted and it deviates away from the pure worship of Allāh, due to what the devils - from amongst mankind and jinn - whisper to some people, beautifying to them their whispers of deception. So Tawḥīd (to worship Allāh alone) is the core and root of man’s fitrah, whereas Shirk (directing any part of worship that belongs only to Allāh, to other than Allāh) is alien to it and is something that deceptively enters into it. Allāh - the Most High - said:
“So set your face to the Haneef Religion (the Religion of pure Tawḥīd), This is the fitrah of Allāh which He created mankind upon. There is to be no change in the creation (i.e. Religion) of Allāh. That is the straight and upright Religion. But most of mankind do not have knowledge.” [Sūrah al-Rūm 30:30].” 
The above āyah clearly refutes the false notion of the atheists; who claim that the natural basis of man is Shirk, and that Tawḥīd evolved in man! Not only does the previous āyah refutes this falsehood, but so do the following two authentic narrations:
Firstly: Allāh's Messenger (ṣallallāhu ʿalayhi wa-sallam) said, that his Lord said: “I created all My Servants upon the true Religion (upon Tawḥīd, free from Shirk). Then the devils come to them end led them astray from their true Religion. They made unlawful to people that which I had made lawful for them, and they commended them to associate in worship with Me, that for which I had sent down no authority.” 
Secondly: Allāh’s Messenger (ṣallallāhu ʿalayhi wa-sallam) said: “Every child is born upon the fitrah (i.e. Islām), but his parents make him a Jew or a Christian or a Magian. It is like the way on animal gives birth to a natural offspring. Have you noticed any born mutilated, before you mutilate them.” Abū Hurayrah said: Recite if you wish:
“Allāh’s fitrah with which He created mankind. There is to be no change to the creation (Religion) of Allāh.” [Sūrah al-Rūm 30:30].” 
: THE BEGINNING OF IDOL-WORSHIP:
Mankind was, in the beginning, a single Ummah (nation) upon Tawḥīd, the pure worship of Allāh alone. Then Shirk gradually overcame them. The basis for this belief is what Allāh - the Most High - said:
“Mankind was one Ummah (nation), then Allāh sent Prophets bringing good news and warnings.” [Sūrah al-Baqarah 2:213]
“Mankind was not except a single Ummah, then they differed.” [Sūrah Yūnus 12:19]
Ibn ʿAbbās (raḍī Allāhu ʿanhu) said:
“Between Nūḥ and Ādam there were ten generations, all of them were upon the Sharīʿah (Law) of the truth, then they differed. So Allāh sent Prophets as bringers of good news and as warners.” 
So, “during the time of the Prophet Nūḥ (ʿalayhi al-Salām), Shirk appeared amongst his people, and they started worshipping idols along with worshipping Allāh. So Allāh said:
“Indeed We sent Nūḥ to his people and he said to them: I have come to you as a clear warner; that you should worship only Allāh.” [Sūrah Hūd 11:25-26].” 
After this clear explanation, it is of the utmost importance for the Muslims to know exactly how Shirk spread amongst the Believers, after they were people upon pure Tawḥīd?
: THE ORIGINS OF SHIRK:
Allāh - the Most Perfect - said about the people of Nūḥ:
“And they said: You shall not forsake your deities/gods, nor shall you forsake Wadd, nor Suwā’, nor Yaghūth, nor Yaʿūq, nor Naṣr.” [Sūrah Nūḥ 71:23]
Ibn ʿAbbās (raḍī Allāhu ʿanhu) relates:
“These were all idols from Nūḥ’s nation, which eventually ended up amongst the Arabs. Wadd was the idol which was worshipped by the Kalb tribe in the region of Dawmatul-Jandal; Suwā’ was for the Hudhayl tribe; Yaghūth by the Ghutayf tribe at Jurf near the region of Sabā; Yaʿūq for the Hamdān tribe and Naṣr was the idol worshipped by the Dhul-Kʿalá of the Himayr tribe. Indeed these five idols were the names of righteous men from the nation of Noah. When they died, Shayṭān whispered to their people to make statues of them in honour of them, and to place these statues in their places of gathering as a reminder of them, so they did this. However, none from amongst them worshipped these statues, until when that generation passed away and the purpose of the statues was forgotten, the next generation then began worshipping them.” 
Muḥammad Ibn Qays (raḍī Allāhu ʿanhu) said:
“Yaghūth, Yaʿūq and Naṣr were a group of righteous men, who were taken as examples to be followed by their people. So when they died their companions said: If we were to make pictures of them it would encourage us to do acts of worship and obedience to Allāh (as they did). So they made pictures of them. However, when they died and the next generation came, Shayṭān whispered to them saying: Your forefathers used to worship these righteous men, and it was due to them that it rained. So they began to worship them.” 
So the beginnings of Shirk lay in the excessive praise and respect given to certain dead pious Muslims, who - due to peoples' love for them - became idols that were worshipped and supplicated along with Allāh. So what needs to be understood is why people felt that they had to worship these righteous people along with worshipping Allāh.
: TAKING THE DEAD AS INTERCESSORS:
Allāh - the One free from all defects - said:
“Indeed We have sent down to you the Book in truth, so worship Allāh alone by making the Religion purely for Him. Surely the Religion, worship and obedience should be for Allāh alone. But those who take as awliyāʾ (friends and protectors) others along with Allāh say: We only worship them so that they may bring us closer to Allāh. Indeed Allāh will judge between them concerning that in which they differ. Indeed Allāh does not guide those who are liars and disbelievers” [Sūrah al-Zumar 39:2-3].
“And they worship those besides Allāh that can neither harm nor benefit them, and they say: These are our intercessors with Allāh. Say to them: Do you inform Allāh about that which He does not have knowledge in the heavens and the earth. Glory be to Allāh and how free He is from that which the associate as partners with Him.” [Sūrah Yūsuf 10:18]
“So Allāh - the Most Perfect - informed us in these two āyāt that the idolaters had taken others from the creation as awliyāʾ along with Allāh. They worshipped them along with Him, by offering duʿāʾ (supplication) to them, and directing to them hope (of attaining safety or of being cured from some illness) and fear, sacrifice, vows, and their like claiming that directing such worship to these awliyāʾ would bring them closer to Allāh and that these awliyāʾ would then act as intercessors between them and Allāh. Yet Allāh - the the Most Perfect - rejected such claims and made clear its falseness and labeled those who claimed such a thing as being liars and disbelievers!” 
“Thus it should be clear to all who have intellect, that the cause of disbelief of the earlier kuffār (disbelievers) was due to them taking the Prophets, awliyāʾ, trees, stones and other things from the creation, as intercessors between them and Allāh, believing that such intercessors would fulfill for them their needs and aspirations, without any permission from Allāh - the Most Perfect - nor His approval. They considered it to be similar to how ministers and advisors intercede on behalf of the people with the worldly kings. So they made a (false) analogy between Allāh - the Most Majestic - and the worldly kings and leaders, saying: lust as a person who wishes to present his needs to a king has to go through the king's advisors and ministers, then likewise we draw closer to Allāh by making duʿāʾ (supplication) to the Prophets and the awliyāʾ; taking them as intercessors between us and Allāh. However, this analogy is the height of futility and falsehood. Since Allāh - the One free from all defects - has none that is comparable to Him, nor can analogies be made between Him and His creation. Indeed no one intercedes for His creation, except with His permission. and none will be granted shafāʿah (intercession), except the people of Tawḥīd. For Allāh - the Most Perfect - has knowledge and power over all things, and is the Most Merciful of those who show mercy. He does not fear anyone, nor is frightened by anyone, since He - the Most Perfect - has power and dominion over His slaves and disposes of their affairs as He Wills. This is contrary to the earthly kings and leaders, for they do not have power over everything, nor do they have knowledge about everything. This is why they are dependant upon advisers, ministers and armies to assist them in matters which they, by themselves, are unable to do. They are also in need of being informed about those who are in need, which is another reason for their being surrounded by ministers and advisors. But the Lord - the Mighty and Majestic, the One free from all defects and shortcomings - is free from any type of need or assistance from any of His creation. He is more merciful to them that their mothers and He is the Most Just. And according to His Wisdom, Knowledge and Power, He places all things in their proper place. It is therefore not permissible to compare Allāh with His creation in this manner.” 
: DUʿĀʾ TO OTHER THAN ALLĀH IS SHIRK:
The Prophet (ṣallallāhu ʿalayhi wa-sallam) said:
“Whosoever dies whilst making duʿāʾ (invocation, supplication) to others besides Allāh, will enter the HellFire.” 
: A PROOF FROM THE COMPANIONS:
Anas (raḍī Allāhu ʿanhu) related:
“In times of drought, ʿUmar Ibn al-Khaṭṭāb (raḍī Allāhu ʿanhu) used to ask ʿAbbās Ibn ʿAbd al-Muṭṭalib to pray for rain on their behalf. He himself would say: “O Allāh we used to ask Your Prophet to supplicate on our behalf to You, and You would bless us with rain. Now we ask the uncle of our Prophet to supplicate to You on our behalf, so bless us with rain.” Anas said: So they would be blessed with rain.” 
Sulaym Ibn ʿĀmir al-Khabāʿirī relates:
“That the sky withheld all rain, so Muʿāwiyah Ibn Abī Sufyān went out to pray for rain along with the people of Damascus. So when Muʿāwiyah sat upon the pulpit he said: “Where is Yazīd Ibn al-Aswad al-Jurashī?” So the people called him and he came stepping between the people. Then Muʿāwiyah commanded him, so he ascended the pulpit and sat at his feet. Then Muʿāwiyah said: “O Allāh! Today we are asking the best and most noblest amongst us to supplicate to You for us. O Allāh, today we put Yazīd Ibn al-Aswad al-Jurashī forward to supplicate to You for us. O Yazīd! Raise up your hands to Allāh.” So he raised up his hands and the people raised up their hands. Then rain-clouds, like large shields, came quickly from the west, and the winds blew, and it rained so much that people could hardly reach their houses.” 
So why didn’t ʿUmar (raḍī Allāhu ʿʿʿanhu) and the rest of the Companions who were with him, go to the grave of our beloved Prophet (ṣallallāhu ʿalayhi wa-sallam); or to the grave of the greatest of the awliyāʾ Abū Bakr (raḍī Allāhu ʿanhu), and make duʿāʾ (supplication) to them for rain? Why? Because they knew that doing so would constitute Shirk? Likewise, why didn't Muʿāwiyah, and those of the righteous people with him, not delegate someone to go to al-Madīnah - to the grave of the Prophet (ṣallallāhu ʿalayhi wa-sallam), or any of the Companions buried there - or directly make duʿāʾ to them from Damascus, in their time of distress and great need? Why? Because they knew that doing so would constitute Shirk!
: SOME POINTS OF BENEFIT:
Firstly: That Shirk began during the time of Nūḥ (ʿalayhi al-Salām), due to the excessive love and veneration that the people had for certain dead pious Muslim.
Imām al-Qurṭabī (d.654H) - raḥimahullāh - said: “The initial images that were made of these righteous men were done in order that the people could be reminded about their righteousness and so strive in being righteous; as they strove. So they worshipped Allāh by the graves of these righteous men. Then a people came after them who forgot the intent of their forefathers’ actions. So Shayṭān whispered to them saying: Your forefathers used to worship these images and held them in great veneration.” 
Secondly: “That Shayṭān is eager to misguide mankind and to plot against them. He comes from the angle of exploiting man’s emotions and lures them into doing acts that are (apparently) good. Thus, when Shayṭān saw amongst the people of Nūḥ their great love and esteem for the righteous, he tricked them into going beyond the bounds in their love, and he got them to make and place statues of these dead pious Muslims in their places of gatherings. The objective of this was to make them swerve away from the right path.
Thirdly: That Shayṭān does not only observe the present generation, and seek to deceive only them; but he also wishes to misguide and deceive future generations. Thus, when he could not plunge the present generation, from the people of Nūḥ, into Shirk, he eagerly awaited the next generation’s arrival, in order that he could misguide them.” 
Fourthly: That the worshipping of dead pious Muslims continues to be practiced amongst the Ummah even today. The difference being is that the names have changed. Thus, instead of worshipping Wadd, or Yaghūth, or Yaʿūq; people have instead directed the same practices of Shirk - like supplicating directly to the pious dead, and taking them as intercessors between them and Allāh - to others; such as to Shaykh ʿAbd al Qādir al-Jīlānī in ʿIrāq, or al-Baydāwī in Eygypt, or Chishtī in India, etc. However, changing the name of a thing, does not change its reality.
 Kitāb al-Tawḥīd (p. 6) of Shaykh Ṣāliḥ al-Fawzān
 Related by Muslim (8/159) and Aḥmad (4/162) from ʿIyāḍ Ibn Himār al-Mujāshiʿī (raḍī Allāhu ʿanhu)
 Related by al-Bukhārī (11/418) and Muslim (18/52), from Abū Hurayrah (raḍī Allāhu ʿanhu)
 Related by al-Tabarī in his Tafsīr (4/275)
 Mabāhith (p. 21) of Shaykh Nāṣir al-ʿAql
 Related by al-Bukhārī (no .4920)
 Related by al-Tabarī in his Tafsīr (29/98)
 Iqāmat al-Burāhīn (p. 27) of Shaykh ʿAbd al-ʿAzīz Ibn Bāz
 Iqaamatul-Buraaheen (pp. 53-55)
 Related by al-Bukhārī (no. 4297), from Ibn Masʿūd (raḍī Allāhu ʿʿʿanhu)
 Related by al-Bukhārī (no. 1010)
 Related by Ibn ’ʿAsākir in Taareekh Dimashq (18/151/1)
 Jāmiʿ li-Aḥkām al-Qurʾān (13/308)
 Bayān Haqeeqatut-Tawḥīd (pp. 8-9) of Shaykh Ṣāliḥ al-Fawzān