Born in Thiruvananthapuram (Trivandrum), capital city of the erstwhile native State of Travancore, on 19 May 1858 to Panavilakath Neelakanta Pillai, a Sanskrit scholar and Parvathy Pillai, a scion of an ancient matrilineal family; both his parents were from middle-class families and employees at the Palace of the Maharaja of Travancore. Pillai got his family name, "Cannankara", through matrilineal succession. Fondly called Ramu, he had a traditional Sanskritized education, early in life, under his father's tutelage which included lessons in Ayurveda and even magic and Tantra. He continued education at the first English school in Thiruvananthapuram. Subsequently, he graduated from His Highness Maharaja's College (the present-day University College Thiruvananthapuram), the first-ever College in Travancore, where he reportedly had a brilliant academic career under John Ross, the principal of the institution and Robert Harvey. and obtained his BA degree from the Madras University in 1881, securing the 7th rank in the Madras Presidency. It was during this period, he started his first periodical named The Kerala Patriot.