His early student life was marked by active protests against the British Raj, which was followed by his joining of the Khudai khidmatgar movement and anti-colonial Pashto poetry. Following the independence of Pakistan in 1947. he joined the National Awami Party and became a close friend of Abdul Wali Khan.
He served as secretary general of the National Awami Party from 1969–1973. He was defeated by Abdul Haq in the 1970 general election, however following a crackdown against the Party by the government of Zulfiqar Ali Bhutto, Ajmal Khattak fled into exile to Kabul. He returned in 1989 and was elected in 1990 to the National Assembly of Pakistan, he was then elected President of the Awami National Party following the retirement of Wali Khan. Following a power struggle in 2000, he briefly formed a breakaway party which was routed in the 2002 election. He rejoined the Awami National Party shortly afterwards and retired from active politics.
Born in Akora Khattak on 15 September 1925, Ajmal Khattak as a child was greatly influenced by Bacha Khan. By the time he turned 17, he was already an active member of the Quit India Movement. He was a student then at the Government High School, Peshawar, but he left to contribute more to the movement. It was the beginning of a political career that stretched over five decades during which his literary pursuits and education took several painful turns. However, he did return to his studies completing a masters in Persian from Peshawar University. At Islamia College, Peshawar, he was among the pioneers who put Pushto literature on the 'modern' track. Linking it to European literature, particularly English, he was able to give it new direction and was acclaimed as a progressive poet.
He has had a long career in both the Indian Independence Movement against the British in the Khyber Pakhtunkhwa (then NWFP) of what was then British India as well as part of the National Awami Party (NAP) in its various incarnations in Pakistan. His early political career began during the Quit India movement after he came under the influence of the Khudai Khidmatgar movement. He was forced to leave the school due to his involvement in the Quit India Movement. As a writer he served as editor of various Newspapers and periodicals, including Anjam, Shahbaz, Adal and Rahber was well as script writer for Radio Pakistan.
He was defeated in the 1970 election in his home constituency. After the resignation of Khyber-Pakhtunkhwa cabinet in protest at President Zulfikar Ali Bhutto's dismissal of the Balochistan government led by Sardar Ataullah Mengal, Ajmal Khattak became the Secretary General of the National Awami Party.
He was the organiser and stage secretary at the United Democratic Front rally held at Liaquat Bagh Rawalpindi on 23 March 1973, when shots were fired at the UDF leaders, including Khan Abdul Wali Khan. In the general melee that followed, a number of UDF and NAP workers were killed by the authorities in their attempt at ending the rally.
Since Ajmal Khattak was a prominent figure in the National Awami Party, he was wanted by the Federal Security Force as part of the general crackdown on NAP. To avoid arrest and possible torture, he fled into self-imposed exile to Afghanistan and stayed there for 16 long years. During this time he was closely associated with the Pakhtunistan movement.
During his years in Kabul, Ajmal Khattak was a close confidant of Badshah Khan, and also enjoyed excellent relations with leaders of the People's Democratic Party of Afghanistan, including President Nur Muhammad Taraki, Babrak Karmal and Dr.Mohammad Najibullah. Despite his leftist leanings he opposed Soviet plans to intervene in Pakistan following the Soviet occupation of Afghanistan.
A committed Marxist-Leninist he was the author of many books in Pashto and had written 13 books in Pushto and Urdu including a History of Pushto Literature (in Urdu) 'Pakistan Main Qaumi Jamhoori Tehrikin, Da Ghirat Chagha, Batoor, Gul auo Perhar, Guloona auo Takaloona, Jalawatan ki Shairee, Pukhtana Shora and Da Wakht Chagha. In 2006, the Torlandi Pukhto Adabi Tolana, Swabi, conferred on Ajmal Khattak the title of Baba-i-Nazam at a big public mushaira.
His work has been the subject of renewed interest by the South Asian Studies Department at the University of Pennsylvania, which has translated his works into English.
However, in November 2006, when the government informed him that he was in line for the lucrative award of Sitara-i-Imtiaz, he refused it with a polite note. He was also awarded the Kamal-e-Funn Award 2007 by the Pakistan Academy of Letters.
He ended his exile in 1989 after the Awami National Party (ANP), the successor of the NAP, entered into an electoral alliance with Nawaz Sharif and his Pakistan Muslim League- led Islami Jamhoori Ittehad (IJI). In the general election of October 1990, Ajmal Khattak was elected from his home district of Nowshera to the National Assembly of Pakistan, defeating Tariq Khattak of the Pakistan Peoples Party (PPP). These elections also signalled the retirement of Khan Wali Khan after his electoral loss to Maulana Hassan Jan of the Jamiat Ulema-e-Islam. Ajmal Khattak was elected as the President of the ANP when Khan Wali Khan stepped down from the post.
In the 1993 general elections, Ajmal Khattak lost his re-election bid in Nowshera to the PPP candidate Major General Naseerullah Babar. As a leading critic of the PPP, it was important for the ANP – IJI alliance to have Ajmal Khattak in parliament, and he was therefore nominated to the Senate of Pakistan in March 1994. His two terms as President of the Awami National Party were noted primarily for the close alliance with former opponents, the Muslim League, after the alliance collapsed in January 1998 over the renaming of the province of NWFP to Pakthunkhwa and Khattak role in leading the Awami National party briefly into joining an alliance known as the Pakistan Oppressed Nations Movement (PONM). The decision to join PONM was made despite strong pressure from party critics who preferred the ANP to ally themselves with a Federal party like the Peoples Party. Eventually, Khattak succumbed to party pressure and the Awami National Party left PONM joining the Grand Democratic Alliance which included the Pakistan Peoples Party.
He was ousted as ANP President in 2000, after a protracted power struggle with Nasim Wali Khan, wife of Khan Abdul Wali Khan, triggered by accusations of his closeness to Pervez Musharraf and his criticism of corrupt politicians in a press conference. Deciding to leave the party he briefly led a splinter group called National Awami Party of Pakistan. His Party was routed in the 2002 general elections amidst the religio-political parties alliance, Muttahida Majlis-e-Amal (MMA), sweep of Khyber-Pakhtunkhwa. After the shock victory of the MMA, he rejoined the Awami National Party after efforts by Khan Wali Khan. He retired from active politics in 2003 and was given the title of party patron in Chief.
Khattak died at a local hospital in Peshawar on Sunday, 7 February 2010. He was 85. He had left politics years earlier and had been residing at his native village, Akora Khattak. He was laid to rest a day after his death. On 12 May 2012, Khattak's shrine was blown up by unknown militants in Akora Khattak village.