It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "Snakes are the transformed form of jinn, just as apes and swine were transformed from among the Children of Israel."
Hadith Referenceالمعجم الأوسط / باب العين / 4269
Hadith Takhrij«أخرجه ابن حبان فى «صحيحه» برقم: 5640، والضياء المقدسي فى «الأحاديث المختارة» برقم: 355، وأحمد فى «مسنده» برقم: 3317، والطبراني فى «الكبير» برقم: 11946»