The Messenger of Allah ﷺ said, "Allah feels protective jealousy, and the believer feels protective jealousy. Allah's jealousy is provoked when a believer does what He has forbidden him."
حدثنا حميد بن مسعدة حدثنا سفيان بن حبيب عن الحجاج الصواف عن يحيى بن أبي كثير عن أبي سلمة
قال رسول الله ﷺ إن الله يغار والمؤمن يغار وغيرة الله أن يأتي المؤمن ما حرم عليه
Graded as agreed upon [muttafaq alayh]. Muslim also recorded it in the book of Tawbah, chapter on the jealousy of Allah the Exalted and the prohibition of indecent acts, hadith no. 36/2761, from the hadith of Hajjaj Sawwaf, and Bukhari recorded it, hadith no. 5223, from the hadith of Yahya bin Abu Kathir, through the same chain.On this subject there is also a narration from Ayesha [Bukhari, no. 1044, and Muslim, no. 901] and from Abdullah bin Umar [I did not find it].