One of the oldest madrasahs of Khiva is Shergazi Khan Madrasah. It was built in the18th century, located in the centre of Ichan Kala.
According to legend,the madrasah was built by slaves for one year, captured by Shergazi-Khan during the attack of Khorasan and Mashhad. After the construction, Shergazi-Khan promised to free captives, but his promise wasn’t kept. As a result, infuriated prisoners killed Shergazi-Khan in his own unfinished madrasah.
The decor of the building is devoid of beauty and quite simple. Because of the tragic death of Khan, the madrasah wasn’t finished. It is one-story building with the exception of two-story building including a yard with four ayvans, a hall for lectures and complex of vestibules. Both representatives of the Khanate of Khiva and students from Turkmenistan learned there. The mausoleum was attached to the west corner of the main façade of madrasah.
Shergazi-Khan Madrasah is one of the oldest and monumental buildings in Khiva. There is a complex of korikhana buildings near the cemetery of Pahlavan Mahmud Memorial. Korikhana is medieval hostels for believers. The dates of beginning and finishing of the mausoleum construction can be found in the scientific works of historian Munis.