Pillai was born in Trivandrum, Travancore State (now Kerala) on 24 July 1898, in a distinguished ancient Nair family of Elankath in South Travancore. He was a matrilineal descendant of Dewan Nanoo Pillai. Elankom Gardens in Diamond Hill, Trivandrum is named after the family's town house. He read English and became a Bachelor of Arts first-class honours in 1918 from Madras University, subsequently receiving a government scholarship to study at Trinity Hall, Cambridge. There, he took the Tripos in Natural Sciences in 1921 and a Tripos in Law in 1922, both times with first-class honours.