Abdullah bin Abbas reported,

Heirs. Regarding "and those with whom you have made a pact" [Nisa 4:33], when the Emigrants first came to Madinah, an Emigrant would inherit from an Ansari, to the exclusion of the Ansari's own blood relatives, because of the brotherhood that the Prophet ﷺ had established between them. Then, when the verse "and to everyone We have appointed heirs" was revealed, that practice was abrogated. Then He said, "and those with whom you have made a pact," meaning support, assistance, and sincere counsel, while the inheritance itself was withdrawn, though a bequest may still be made in his favor.

Azami 8693

Sahih

في قوله تعالى: {ولكل جعلنا مولي} [سورة النساء: ٣٣]

عن ابن عباس قال

ورثة {والذين عقدت أيمنكم} [النساء: ٣٣] كان المهاجرون لما قدموا المدينة يرث المهاجر والأنصاري دون ذوي رحمه للأخوة التي آخي النبي ﷺ بينهم. فلما نزلت: {ولكل جعلنا مولي} نسخت، ثم قال: {والذين عقدت أيمنكم}. من النصر والرفادة والنصيحة، وقد ذهب الميراث، ويوصي له.

الأعظمي 8693صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Biography of the Prophet ﷺ
Chapter
Emigration of the Prophet ﷺ and his companions from Makkah to Madinah
Section
Brotherhood between the Muhajirun and the Ansar
Numbering
Jami al-Kamil 8693 (2nd edition)
Azami 8693