4-Surah An-Nisa ( The Women ) 33
And for all, We have made heirs to what is left by parents and relatives. And to those whom your oaths have bound [to you] – give them their share. Indeed Allah is ever, over all things, a Witness.
وَلِكُلٍّ جَعَلْنَا مَوَالِيَ مِمَّا تَرَكَ الْوَالِدَانِ وَالْأَقْرَبُونَ ۚ وَالَّذِينَ عَقَدَتْ أَيْمَانُكُمْ فَآتُوهُمْ نَصِيبَهُمْ ۚ إِنَّ اللَّهَ كَانَ عَلَىٰ كُلِّ شَيْءٍ شَهِيدًا
Quran's Tafhim ( explanation)
*55). According to Arab customary law, those who concluded compacts of alliance and friendship also became mutual heirs. Likewise, an adopted son inherited from his foster-father. While abrogating this customary law, this verse reveals that inheritance goes to one's kin according to the rules for the distribution of inheritance laid down by God Himself. However, if a man has made commitments to people, he has the right to give away to them whatever he wishes during his lifetime.