This man should seek Allah's Forgiveness and repent to Him from this grievous sin. Then he has to
give the right to its rightful owners, even through the ruler. If the inheritors refuse to take the money, he can give it in charity or put it in a charitable project, such as building a Masjid (mosque) on behalf of the money owner. May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.