It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "There is not a single one of you except that a companion from among the devils has been assigned to him." The Companions (may Allah be pleased with them) said: "O Messenger of Allah, you too?" He (peace and blessings be upon him) said: "Yes, but Allah Almighty has helped me against him, so he has become Muslim."
Imam Ahmad (may Allah have mercy on him) and his son Abdullah (may Allah have mercy on him) narrated it through Uthman bin Abi Shaybah (may Allah have mercy on him) from Jarir (may Allah have mercy on him).
It has a supporting narration (shahid) in Sahih Muslim, in the hadith of Abu al-Ja'd (may Allah have mercy on him) from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him), and in the hadith of Urwah (may Allah have mercy on him) from Sayyidah Aishah bint Abi Bakr (may Allah be pleased with her).