On return to India in 1932, he became a professor in Muslim University. In the meantime, he joined the Congress and soon became a leading figure of its leftwing. He was included in the central executive of the
Congress Socialist Party, along with Jaiprakash Narain, EMS, Acharya Narendra Dev, Z A Ahmed, Sajjad Zaheer, Ram Manohar Lohia, Ashok Mehta, etc. He was made one of the secretaries of the AICC in 1936. Congress president made him in-charge of Muslim Affairs. Ashraf worked in the AICC office in Allahabad. Dr Ashraf was assigned by
CPI to work on the student front too, and he used to guide the CPI fraction in the student movement. He presided over the Calcutta session of
All India Students Federation in January 1939, and inaugurated the historic AISF session held in Nagpur in (December) 1940. He became a centre of attraction of student meetings all over the country, and played a very important role in the guidance of the AISF work. Dr Ashraf also worked as the secretary to Maulana Abul Kalam Azad. Dr Ashraf along with other Communist leaders was interned in Deoli Detention Camp 1940 onwards. He participated in the 30-day hunger strike there. This and the conditions in Deoli Camp seriously affected his health. He was released in 1943 with a shattered health. He worked in the party centre in Bombay after release, and wrote a lot. He shifted to Delhi in 1946 and used to live in the party commune in Daryaganj on a wage of just Rs 8. Most of the comrades in the commune were youth, with Ashraf as the eldest. He was very co-operative, soft, humble and highly disciplined.
Exile Party decided to publish ‘Awami Daur’, an Urdu daily, from Delhi. Dr K M Ashraf was appointed its editor. Dr Ashraf was asked by the party to shift to Pakistan in 1948 after ‘Awami Daur’ was closed down. The conditions there were very difficult and Communists had to face severe repressions. Party was banned there and Ashraf had to go underground. He was arrested on the charge of being an Indian living in Pakistan illegally. His physical condition deteriorated further. He was released on the condition that he would never return to Pakistan. India too was not prepared to accept him as he was not an Indian citizen. He went to England and resumed his research in Indian society and history. He was also undergoing treatment. He worked in the British Museum. He was not happy and wanted to return to India. There followed long years of efforts despite his closeness to Nehru and Maulana Azad. Nehru took special interest.
Return to India It was only after two years’ efforts that he could get Indian citizenship. At the request of Nehru he worked in Srinagar on the history of Kashmiri people. Two years later, he joined KM College in Delhi and became head of history department. He presented several papers to the Indian History Congresses. ==Death==