Initially, a member of the Communist Anti-British League, he joined Lee Kuan Yew's People's Action Party (PAP) in 1954. Nair had been detained in 1951 by the British for anticolonial activities. In 1955, Nair contested the 1955 Singaporean general election but was the only PAP candidate who did not get elected. In 1956, he was detained again under the Preservation of Public Security Ordinance Act together with unionists Lim Chin Siong and James Puthucheary as suspected Communist subversives after the Chinese middle schools riots. Nair was released in 1959 when the PAP won the elections in a landslide victory. He was subsequently appointed political secretary to the Minister for Education. He returned to teaching after a year. In 1960, he became the chairman of the Prisons Inquiry Commission and launched the Adult Education Board.