The Messenger of Allah ﷺ said, "Jibreel kept urging me to treat the neighbor well until I thought he would make him an heir."
حدثنا أبو بكر بن أبي شيبة حدثنا يزيد بن هارون وعبدة بن سليمان ح و حدثنا محمد بن رمح أنبأنا الليث بن سعد جميعا عن يحيى بن سعيد عن أبي بكر بن محمد بن عمرو بن حزم عن عمرة
أن رسول الله ﷺ قال ما زال جبريل يوصيني بالجار حتى ظننت أنه سيورثه
Bukhari narrated it in the Book of Manners, Chapter on Enjoining Kindness to the Neighbour and Allah's Saying, "Worship Allah..." etc., no. 6014, from the hadith of Yahya bin Saeed with this wording. Muslim narrated it in the Book of Kindness and Maintaining Ties, Chapter on Enjoining Kindness to the Neighbour and Being Good to Him, no. 2624, from Ibn Abu Shayba with this wording.