The article studies religious-didactic and Sufi motifs in the works of Kazakh poets who lived in the second half of the XIX-early XX centuries. It is known that many of them at one time studied in Muslim madrassas in the cities of Central Asia and Russia. The paper analyzes aspects of Sufi literature, the most common words in the poetry of shairs: garip, miskin, kul, pahir, kamine, beishara. The authors focus on various aspects of Sufi literature, arguing each of them with relevant examples. In 182С.Қ. Қосанов, Ә.М. Кәкенова, Ж.С. Әділханова Turkic Studies Journal 2 (2023) 167-184the poetry of shairs, who deeply absorbed the traditions of classical poetry of the East, there are many common themes, plots, motifs and artistic techniques. The article also pays special attention to the motives of ‘abjad’ and ‘alphabet’, which were often used by the authors of the works. In this regard, the idea of the revival of the ‘nama’ genre by Kazakh poets, which was clearly manifested in the literature of the Golden Horde era, was touched upon here. The article analyzes the influence of the medieval literary tradition on the Kazakh poetry of the early twentieth century. The works of outstanding representatives of written literature, such as Akan Seri Koramsauly, Mashhur Zhusup Kopeyuly, Shakarim Kudaiberdiuly, Makysh Kaltayuly, Omar Shorayakuly, Kanly Zhusup, Turmagambet Iztileuuly, Kete Zhusup, Karasakal Yerimbet are compared with samples of poems by Turkic-Kipchak poets such as Yasawi, Bakirgani, Rabguzi, Khorezmi and Sarayi. Conceptual reflections on artistic images used by poets of two eras are presented. The article introduces into scientific circulation the works of poets, who were insufficiently studied in Kazakh literary studies.