
He began at the Melaka Malay School. As early as 14 he continued at the Pondok Bunut Payong school in Kelantan from 1922 to 1927, studying under Tok Kenali. He was among the nine students of Tok Kenali who went on to become State Muftis.
He furthered his religious studies in Makkah al-Mukarramah from 1927 for six years, under Tuan Guru Husin al-Yamani, Syeikh Mokhtar al-Atarrid of Bogor, Syeikh Haji Omar Sembawa and Syeikh Hassan al-Yamani.
He was officially appointed the second Mufti of Melaka on 10 June 1960 / 15 Zulhijjah 1379H and held the office for 19 years, coinciding with the establishment of the Melaka Islamic Religious Council.
After returning from Makkah in 1933 he opened a madrasah in Kuala Sungai Baru named Madrasah al-Falah, later renamed Madrasah al-Hasaniah in 1937 after his own name as its founder. It drew students from far afield, including Indonesia (Jambi and Lingga), and was built on waqf land he owned together with his companion Hj. Muhammad Belimbing. In 1993 the Melaka Islamic Religious Department (JAIM) took over its management, and it is today known as Sekolah Menengah Agama JAIM Darul Falah.
He served as Imam of Masjid Kuala Sungai Baru and taught religion widely across Melaka. As Mufti he personally went to the field to set the parish boundary between Masjid Serkam and Masjid Serkam Darat, easing local matters of Friday prayer, marriage and death.
Awarded the Darjah Seri Melaka (DSM) by the Melaka State Government.
He passed away on 6 February 1979 / 8 Rabiul Awwal 1399H at the age of 71, and was laid to rest at the Muslim Cemetery of Kampung Pantai, Kuala Sungai Baru, Melaka.