Sayyidah Umm Salamah (may Allah be pleased with her) narrates: The Prophet (peace and blessings be upon him) would often say in his supplication: "O Allah, O Turner of hearts, keep my heart firm upon Your religion." Sayyidah Umm Salamah (may Allah be pleased with her) narrates: I said: "O Messenger of Allah, do hearts really change?" The Prophet (peace and blessings be upon him) said: "Yes! There is no human being among the creation of Allah Almighty, of the children of Adam, except that his heart is between two of the fingers of Allah Almighty. If Allah Almighty wills, He keeps it upright, and if He wills, He makes it deviate. So we ask Allah Almighty not to make our hearts deviate after He has guided us, and we ask Him to grant us mercy from Himself; indeed He is the Bestower." After this the narrator mentioned the full hadith, part of which al-Tirmidhi has also narrated.
Ahmad recorded it; its chain contains Shahr bin Hawshab, who has been declared trustworthy, though there is weakness in him.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب القدر / 11912