After retirement, he built a dergah, numerous buildings and charitable trusts in Beshiktash, and planted trees in the area.
As a matter of fact, it is stated that when the milk of Şehzade Süleyman's mother was not enough, Afife Hatun also breastfed the prince and they were the foster-brothers of Yahya Efendi and Sultan Suleyman.
After Sultan Selim's ascension to the throne, Yahya Efendi moved to Istanbul with his family in the entourage of Şehzade Süleyman.
Afterwards, he worked as a professor in the madrasahs of Hacıhasanzâde, Efdaliye, Coban Mustafa Pasha in Gebze, Mihrimah Sultan in Üsküdar, and Sahn-ı Semân, where he was appointed to replace Kadızâde Ahmed Şemseddin Efendi in 960 AH (1553 AD).
[9][5] After leaving his job, he bought a large land in Beşiktaş with his own means and spent the rest of his life in the dervish lodge he founded here (Yahya Efendi Külliyyesi).
It is stated that he went to the region named Hıdırlık, which is considered to be the meeting place of Moses and Hızır by the Bosphorus, through a sign from a person he saw in his dream, and established his tekke.
[5] Along with Aziz Mahmud Hudayi, Telli Baba, and Prophet Joshua, the four are considered to be the Four Patron Saints of the Bosphorus.