Seyid Yahya Bakuvi tomb is located in the middle courtyard of Palace complex. The octagon shaped tomb is also known as “Dervish tomb” among people. Presumably this is the tomb of a well- known scientist Seyid Yahya Bakuvi who was born in Shirvan region of Azerbaijan. This world-famous scientist was a theologian of encyclopedic knowledge as well as a well-known sufi. His scientific works on philosophy, history, astronomy, medicine and mathematics mainly written in arabic language decorate the world’s libraries and museums now. 8-pointed tomb of Seyid Yahya Bakuvi, a palace poet and scientist lived in time of Shirvanshah Khalilullah I, is located in the 2nd courtyard. At that time, Seyid Yahya Bakuvi had gained a reputation as a philosopher, teacher, astrologist and historian. The building known as "Dervish’s Tomb" was built in the XV century.