The Messenger of Allah ﷺ said, "Whoever swears a binding oath in order to seize the property of a Muslim by it, while he is lying in that oath, will meet Allah with Allah angry at him."The narrator continued, Ashath bin Qays then came in and asked, "What is Abu Abdul-Rahman telling you?"They said, "Such and such."He said, "Abu Abdul-Rahman has spoken the truth. It was concerning me that this was revealed. There was a dispute between me and another man over a piece of land in Yemen, and I brought the case against him before the Prophet ﷺ.He asked me, "Do you have any proof?"I said, "No."He said, "Then he must take an oath."I said, "In that case he will simply swear."At that point the Messenger of Allah ﷺ said, "Whoever swears a binding oath in order to seize the property of a Muslim by it, while he is lying in that oath, will meet Allah with Allah angry at him."Then this was revealed, "Indeed, those who exchange the covenant of Allah and their oaths for a small price" [Al Imran 3:77], to the end of the verse.
عن رسول الله ﷺ قال: من حلف على يمين صبر يقتطع بها مال امرئ مسلم هو فيها فاجر، لقي الله وهو عليه غضبان. قال: فدخل الأشعث بن قيس، فقال: ما يحدثكم أبو عبد الرحمن؟ قالوا كذا وكذا. قال: صدق أبو عبد الرحمن، في نزلت، كان بيني وبين رجل أرض باليمن، فخاصمته إلى النبي ﷺ، فقال: هل لك بينة. فقلت: لا. قال: فيمينه. قلت: إذن يحلف. فقال رسول الله ﷺ عند ذلك: من حلف على يمين صبر يقتطع بها مال امرئ مسلم وهو فيها فاجر لقي الله وهو عليه غضبان. فنزلت {إن الذين يشترون بعهد الله وأيمنهم ثمنا قليلا} [آل عمران: ٧٧] إلى الآخر الآية.
Bukhari narrated it in the Book of Sharecropping (2356), and Muslim in the Book of Faith (138), both from the hadith of Amash, from Abu Waail, from Abdullah bin Masud, mentioning it in similar fashion. The wording given here is Muslim's.In another version reported by Bukhari (2416, 2417), Ashath said, "There was a piece of land between me and a Jewish man, and he denied my claim, so I brought him before the Prophet ﷺ..." and the rest is the same.In another version reported by both of them, the dispute was over a well.In another version reported by Bukhari (2516), "Your two witnesses or his oath."