Sunan Giri was the Islamic priest in Java who had enough enormous influence especially in 15-17 th AD century. The name of “Sunan Giri” is not limited referring to Raden Paku (Sunan Giri I) who started the political entity of Giri Kedhaton, but also refers to almost all of the sunans from Giri who are also descendants of Sunan Giri I. The Babad Tanah Jawi (BTJ) as a historical literature book of the Mataram palace in addition to telling the history of Java from the pre-Demak era to Mataram, on the other hand also mentions a lot about the existence of Sunan Giri. This research seeks to reveal the legitimacy narratives of the Islamic Mataram Kingdom in BTJ involving Sunan Giri as a religious figure who can exert political influence on them. By using a qualitative-descriptive method, the writer analyzes the text data of BTJ's narratives that contain elements of legitimacy involving Sunan Giri. From the philological data, it is then balanced with historical data from several historical works to find out how the socio-political conditions occurred in the 15th-17th century AD, especially in Java. The mention of legitimacy related to Sunan Giri in BTJ occurred in the early of Demak, early of Pajang, early until the mid of Mataram. Those stories are closely related to the existence of Sunan Giri as a priest with enormous influence both in Java and outside Java. Therefore, BTJ, which contains such information, has become one of the media for the legitimacy of power by the kings of Mataram.