History of Gorakhpur, Uttar Pradesh, India reads like a fascinating tale. Gorakhpur owes its name to ascetic Gorakshnath, who was a distinguished saint of 'Nath Sampradaya'. A celebrated shrine 'Gorakhnath' was built in his tribute at the same location where he practiced austerities.
According to Gorakhpur History, the ancient Gorakhpur comprised the districts of Azamgarh, Basti and Deoria, besides parts of Nepal tarai. These regions, which may be termed as Gorakhpur Janpad, had been a significant centre of Aryan civilization and culture.
Gorakhpur was a division of the celebrated kingdom of Koshal, one of the sixteen mahajanpadas of the 6th Century B.C. The first known monarch who ruled over this area was Iksvaku who founded Kshatriya, the solar dynasty. Iksvaku's capital was at Ayodhya. It produced several famous kings till the accession of Ram, considered the greatest ruler of the solar dynasty. Since then, this place remained an important part of the former empires of Maurya, Kushana, Shunga, Harsha and Gupta dynasties. According to History of Gorakhpur, Mausen of Madan Singh, the Tharu king during 900-950 A.D. ruled over the city of Gorakhpur and its adjoining area.
During the medieval period, when the whole of northern India lay powerless before Mohammad Ghori, Gorakhpur was not left out either. For quite a long time, it remained under the control of the Muslim rulers. Many Muslim rulers ruled at this place, beginning from Qutub-Ud-Din Aibak to Bahadur Shah. It is heard that Ala-ud-din Khilji (1296-1316) planned the conversion of the old temple of Goraksha, an admired deity of Gorakhpur, into a mosque. However, on Akbar's reorganization of the kingdom, Gorakhpur lent its name to one of the five Sirkars that comprised the province of Avadh.
Modern era was marked by the transfer of this land by the Nawab of Avadh in 1801. The East India Company gained the ruling power with this transfer. With this change of hands, Gorakhpur got its status of a 'DISTRICT. In 1829, Gorakhpur became the headquarters of a segment by the same name that included the districts of Azamgarh, Gorakhpur and Ghazipur.
Basti, a new district was carved out from the regions of Gorakhpur in 1865. Gorakhpur was further split up to form yet another new district of Deoria in 1946. The third splitting up of Gorakhpur held in 1989 brought the district of Mahrajganj into existence.