A restless soul and constantly in search of ways to inspire the ummah (Muslim community), Hamka was soon involved in grassroots efforts across what came to be known as Indonesia. In his early twenties, He joined his father and other relatives to become a strong proponent of the Muhammadiyah movement. These were difficult times for members of the movement who were criticized and castigated for the modernist and anti-traditionalist ideas that they were promoting. The more vehement the attacks were launched against the Muhammadiyah activists, the more determined and resolute they become until the movement spread quickly across West Sumatra and beyond.
Hamka was not satisfied with playing a crucial role in Islamic activism. Encouraged by his brother-in-law, Sutan Mansur, he became involved in political activism via the Partai Sarekat Islam Indonesia (PSII), which was agitating for the independence of Indonesia. For Hamka, freedom is a necessary precondition for Islam to flourish in any context and the freedom of Indonesia was something that all Muslims should work towards through the force of ideas and civic engagement.
The outbreak of the Second World War and the Japanese Occupation (1942–45) marked a major turning point in Hamka’s dreams of realizing an Indonesia that was free from the shackles of colonialism. A new form of colonial rule was put in place by the Japanese. Hamka took the controversial step of collaborating with the Japanese. Appointed as the adviser of Muslim affairs, Hamka enjoyed many privileges from the Japanese in the city of Medan. But the comforts of life borne out of working with the enemy was soon cut short by the closing of the great war. Hamka was censured by many Muslim leaders, who branded him as someone who traded his religion for material benefits from the Japanese. Anticipating a violent backlash from Muslims in Medan, Hamka returned to his hometown in West Sumatra in 1945. Anyone who encountered him saw that he was a broken man.
But soon enough, an opportunity for atonement came. On 17 August, 1945, the Indonesian revolution broke out. The revolt of the masses against centuries of Dutch rule provided Hamka the much needed moment to golden to reclaim his reputation in the eyes of Muslims. Hamka used his writing skills to propagandize the noble causes of the revolutionaries and to expose the ills of western colonial rule. The books and essays he wrote during this period all had revolutionary themes and visions in them with titles such as Revolusi Agama and Adat Minangkabau Menghadapi Revolusi. Indeed, it was during the years of revolution that Hamka carved a niche for himself as the most celebrated Muslim intellectuals in the new Republic of Indonesia. The brief setback following the Second World War turned out to be a time of retrospection for him and a hard reminder that he must always be true to the cause of the common people, the country and Islam.