Human beings are forever in need of guidance for all their actions. It is beyond their ability to frame laws for themselves and obey them. Due to the inherent differences and shortcomings of the human mind, human beings cannot frame any law which is flawless in all respects. Inevitably, they have to turn to the Lord Almighty for guidance. For this reason, Allah Ta'ala has guided us through His revelation (Wahi).
The to-be-recited revelation (Wahi Matlu’) and the not-to-be-recited revelation (Wahi Ghair Matlu’) i.e. the Hoy Quran and the Hadith are the only 2 sources of Islamic Law. Allah Ta'ala has declared the fulfillment of this religion in Surah Maida:
Today I have perfected your Din (Religion) for you, and have completed My Blessing upon you, and have chosen for you Islam (as) Din (a complete code of life). Surah Maida (5:3)
Allah Ta’ala has also said:
Truly, Islam is the only Din (Religion) in Allah’s sight. And the people of the Book disagreed, after knowledge had come to them, only on account of their mutual jealousy and contention. And he who denies Allah’s revelations, then surely Allah hastens in calling to account. Surah Al Imran (3:19)
And whoever seeks a Din (Religion) other than Islam that shall not at all be accepted from him, and he will be among the losers in the Hereafter. Surah Al Imran (3:85)