Undoubtedly, Imam al-Ghazali is the founder of the Maqasid Sharia knowledge framework. This is marked by the work of Imam al-Ghazali in the 5th century entitled "al-Mustasfa min ‘Ilm al-Usul" and "al-Mankhul min Ta’liqat al-Usul". Therefore, this study aims to determine the theory of Maqasid Sharia according to Imam Al Ghazali and its application in the Compilation of Islamic Law (KHI) in Indonesia. This study is based on a library research which is sourced directly from al-Ghazali’s books; al-Mustasfa and al-Mankhul, as well as the Compilation of Islamic Law manuscript, particularly in marriage chapter. The results of this study indicate that the Maqasid Sharia concept has been applied in several cases in the marriage chapter, such as cases in marriage registration law of taklik talak and pregnancy marriage. The categories of Maqasid Sharia used in the enforcement of these laws are Maqsad ad-Daruriyyah namely Hifz ad- Din (protecting religion), Hifz an-Nafs (protecting soul), Hifz al-Aql (Protecting intellect), Hifz an-Nasl (protecting lineage) and Hifz al-Mal (protecting property) [ABSTRACT FROM AUTHOR]