Hamzah Fansuri (Jawi: حمزه فنسوري ; also spelled Hamzah Pansuri, d. c. 1590 ?) was a 16th century Sumatran Sufi writer, and the first writer known to pen mystical panentheistic ideas in the Malay language. He also wrote poetry in addition to his prose, and he is considered to be the first known poet of the Malay world.
Information on Hamzah's life comes largely from the takhallus bait (pen-name stanza) that ends his poetry (syair), and many of his biographical details are uncertain. His name indicates that he may be from Barus (also known as Fansur to the Arabs), or have spent a large part of his life there. A link to the Siamese Ayutthaya (Shahr-i-Naw) has also been proposed, although it may be that he travelled to Ayutthaya rather than that being his birth place. He was known as a Sufi spiritual master and it is thought that he may have worked at the court of the Aceh Sultanate.
Hamzah travelled widely, and was known to have visited the Malay Peninsula, Mughal India, Mecca and Medina, and Baghdad. He was one of the first Southeast Asians to complete the hajj. The date of his death was generally assumed to be around 1590 or earlier, although a later date during the reign of Sultan Iskandar Muda had also been proposed. However, an inscription on a gravestone found in Mecca for a Shaykh Hamza b. Abd Allah al-Fansuri recorded a date of April 11, 1527. Such an early date, if confirmed, may suggest that Hamzah did not live or work in Aceh, rather he was in Barus before leaving for Mecca where he died.
Hamzah Fansuri's panentheism is derived from the writings of the medieval Islamic scholars. He was influenced by Ibn Arabi's doctrine of Waḥdat al-Wujūd popular in Persia and Mughal India during the 16th century. He perceived God as immanent within all things, including the individual, and sought to unite one's self with the indwelling spirit of God. He employed the doctrine of seven stages of emanation (martabat) in which God manifests Himself in this world, ending in the Perfect Man, a doctrine widespread in Indonesia at the time. His teachings were promoted by Aceh theologian Shamsuddin al-Sumatrani.