THE BEGINNINGS OF DEVIATION
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 Allah. So what needs to be understood is why people felt that they had to worship these righteous people along with worshipping Allah.
Allah - 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 Allah is the Provider, the Possessor of Might and Strength.”[Sooratudh-Dhaariyaat 51:56-58]
So the soul - if left to its fitrah (natural disposition and inclination) - would find itself acknowledging Allah’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 Allah, due to what the devils - from amongst mankind and jinn - whisper to some people, beautifying to them their whispers of deception. So Tawheed (to worship Allah alone) is the core and root of man’s fitrah, whereas Shirk (directing any part of worship that belongs only to Allah, to other than Allah) is alien to it and is something that deceptively enters into it. Allah - the Most High - said:
"So set your face to the Haneef Religion (the Religion of pure Tawheed), This is the fitrah of Allah which He created mankind upon. There is to be no change in the creation (i.e, Religion) of Allah. That is the straight and upright Religion. But most of mankind do not have knowledge."[Soorah Room 30:30]."
The above Aayah (sign) clearly refutes the false notion of the atheists; who claim that the natural basis of man is Shirk, and that Tawheed evolved in man! Not only does the previous Aayah refutes this falsehood, but so do the following two authentic narrations:
Firstly: Allah's Messenger sallAllahu 'alayhi wa sallam said, that his Lord said: "I created all My Servants upon the true Religion (upon Tawheed, 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 mode lawful for them, and they commended them to associate in worship with Me, that for which I had sent down no authority."
Secondly: Allah's Messenger sallAllahu 'alayhi wa sallam said: "Every child is born upon the Fitrah (i.e. Islaam), 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." Abu Hurayrah said: Recite if you wish: "Allah's fitrah with which He created mankind. There is to be no change to the creation (Religion) of Allah." [Soorah Room 30:30]."
Mankind was, in the beginning, a single Ummah (nation) upon Tawheed, the pure worship of Allah alone. Then Shirk gradually overcame them. The basis for this belief is what Allah - the Most High - said:
“Mankind was one Ummah (nation), then Allah sent Prophets bringing good news and warnings.” [Sooratul-Baqarah 2:213]
“Mankind was not except a single Ummah, then they differed.” [Soorah Yoonus 12:19]
Ibn ’Abbaas (radiyAllahu ’anhu) said: “Between Nooh and Aadam there were ten generations, all of them were upon the Sharee’ah (Law) of the truth, then they differed. So Allah sent Prophets as bringers of good news and as warners.” 
“Indeed We sent Nooh to his people and he said to them: I have come to you as a clear warner; that you should worship only Allah.” [Soorah Hood 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 Tawheed?
Allah - the Most Perfect - said about the people of Nooh:
“And they said: You shall not forsake your deities/gods, nor shall you forsake Wadd, nor Suwaa’, nor Yaghooth, nor Ya’ooq, nor Nasr.” [Soorah Nooh 71:23]
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 Allah. So what needs to be understood is why people felt that they had to worship these righteous people along with worshipping Allah.
Allah - the One free from all defects - said:
“Indeed We have sent down to you the Book in truth, so worship Allah alone by making the Religion purely for Him. Surely the Religion, worship and obedience should be for Allah alone. But those who take as awliyaa‘ (friends and protectors)others along with Allah say: We only worship them so that they may bring us closer to Allah. Indeed Allah will judge between them concerning that in which they differ. Indeed Allah does not guide those who are liars and disbelievers.” [Sooratuz-Zumar 39:2-3]
“And they worship those besides Allah that can neither harm nor benefit them, and they say: These are our intercessors with Allah. Say to them: Do you inform Allah about that which He does not have knowledge in the heavens and the earth. Glory be to Allah and how free He is from that which the associate as partners with Him.” [Soorah Yoosuf 10:18]
“So Allah - the Most Perfect - informed us in these two aayaat that the idolaters had taken others from the creation as awliyaa‘ along with Allah. They worshipped them along with Him, by offering du’aa (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 awliyaa‘ would bring them closer to Allah and that these awliyaa‘ would then act as intercessors between them and Allah.
The Prophet (sallAllahu ’alayhi wa sallam) said:
“Whosoever dies whilst making du’aa (invocation, supplication) to others besides Allah, will enter the HellFire.” 
A PROOF FROM THE COMPANIONS
Anas (radiyAllahu ’anhu) related:
“In times of drought, ’Umar Ibnul-Khattaab (radiyAllahu ’anhu) used to ask ’Abbaas Ibn ’Abdul-Muttalib to pray for rain on their behalf. He himself would say: “O Allah 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.”
Imaam al-Qurtubee (d.654H) - rahimahullaah - 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 Allah by the graves of these righteous men. Then a people came after them who forgot the intent of their fore-fathers' actions. So Shaytaan whispered to them saying: Your fore-fathers used to worship these images and held them in great veneration." 
Secondly: "That Shaytaan 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 Shaytaan saw amongst the people of Noah 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 Shaytaan 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 Noah, 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 Yaghooth, or Ya'ooq; people have instead directed the same practices of Shirk - like supplicating directly to the pious dead, and taking them as intercessors between them and Allah - to others;
1. Kitaabut-Tawheed (p.6) of Shaykh Saalih al-Fawzaan.