The exact date of Shams al-Ma'arif's composition is unknown, but it is believed to have been written in the 13th century during the Ayyubid dynasty. The book's author, Ahmad al-Buni, was a renowned Sufi scholar and mystic who lived in Egypt during this period. Al-Buni's work was influenced by various Islamic traditions, including Sufism, Shi'ism, and Islamic mysticism.