Mahalingam worked as a history professor under the leadership of K. K. Pillay till 1959. When the Department of Indian history and archaeology was split into two new departments - Department of Indian History and Department of Ancient History and Archaeology in 1959, Pillay remained head of the Indian history department while Mahalingam was promoted to head the newly created Department of Ancient History and Archaeology, a post which he held to retirement in 1971.