It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that he said: "The Messenger of Allah (peace and blessings be upon him) did not leave us any gold or silver as inheritance, except what is between the two covers (that is, the Noble Qur'an)." Then I went to the hilt of the sword of the Messenger of Allah (peace and blessings be upon him) and found in its sword-belt a scroll in which was written: "Whoever introduces something new (an innovation or a crime) into the religion, or gives shelter to an innovator (or criminal), or ascribes himself to someone other than his father, or takes as patrons (a wala' bond) others than the masters who freed him, upon him is the curse of Allah, the angels and all the people."
In Sahih Muslim there is a supporting narration (shahid) for it with a similar meaning from the hadith of Sayyiduna Ali bin Abi Talib (may Allah be pleased with him).
Related hadith on this topic