Nationalism, a modern sociopolitical phenomenon, bears a close connection with the rise of modern educational institutions. Additionally, modern educational institutions, in line with the ideology of nationalism, take upon themselves to consolidate ethnic and cultural diversities and transform them into a solid national identity in order to constitute the nation as a political unit. This article aims to survey the role of modern educational institutions in constructing a shared national identity. The present article, employing a comparative-historical analysis, will shed light on how modern nation-states were constituted in Iran and Turkey. Ultimately, based on theory of nationalism by Ernest Gellner (1925-1995) the results of the study indicated that both in Iran and Turkey, the notion of nation was fabricated via the nationalist ideology. Thus, in both countries, the educational institutions, which were in charge of political forces, did their best to help the state in order to build a homogenous nation.