The Hajj is one factor that encourages the emergence of a movement among the ulama based on a sense of nationalism towards their nation and country. However, within the scope of primary to secondary education in Indonesia, the history surrounding the Hajj in fostering a spirit of nationalism among ulama is almost never taught to students. This research aims to determine the role of the Hajj pilgrimage in fostering awareness and a spirit of nationalism among ulama and the relevance of this event to history learning in schools. This research was written using historical research methods carried out through five research stages, namely topic selection, heuristics, criticism, interpretation, and historiography. The results of this research show that the pilgrimage in the 19th century contained nationalist values such as religious attitudes, love for the homeland, solidarity, hard work, independence, caring, responsibility, national spirit, and willingness to sacrifice. The nationalist values contained in this incident align with the objectives of history learning to form a generation of people who have a nationalist spirit and can practice the noble values of the Indonesian nation. Therefore, the Hajj events in the 19th century need to be taught to students through history lessons so that students can understand the importance of nationalism, which was behind the actions of the ulama in resisting Dutch rule in Indonesia.