In 1876, following the demise of his father, he returned to Mangalore and successfully practiced law (it is said that he often attempted to persuade amicable out-of-court settlements for his clients, although this sometime cost him his fee). Pai was also an admirer of nationalist leaders of India. He held Sri Aurobinda Ghosh (later known as
Sri Aurobindo) in great admiration. He was an avid reader of Aurobindo's paper 'Yugantar'. In his office room was prominently displayed a portrait of
Ashwini Kumar Dutta, one of the heroes of nationalist Bengal, one word from whom could make the traders of his native town refuse to sell even a yard of cloth to European officers, including the collector of the district. Pai was a patriot at heart and a humanist by action. In 1891, four teachers, whom he had met in Madras,(now
Chennai) approached him with a proposal to start a school in Mangalore and thus was born the
Canara High School, on 22 acres of land donated by Upendra Pai, his father in Mangalore. He also firmly believed that for the social and economic uplift, education was the key. Education is not confined to only men. Shortly thereafter, in 1894, with a view to encouraging the education of girls, he started the Canara Girls' High School, indeed a revolutionary step considering the prevalent values and attitude of the people towards women's education at that time. The disastrous crash of the Arbuthnot Company at the beginning of the 20th century prompted him to start, in 1906, the Canara Hindu Permanent Fund Ltd.(now
Canara Bank) with a view to enabling the community to mobilise its own resources for self-help. All the three institutions namely,
Canara Bank, Canara High School and Canara Girls' School started by him have grown in size and stature. Among his important contributions to the GSB (Gaud Saraswat Brahmin) community was the setting up of the ‘Poor Boys Education Fund’ (which became ASRP Memorial Fund as per the decision taken at a meeting of the GSB community held in the Bhuvanendra Hall on 1 August 1909) under the aegis of Gowda Saraswath Brahman Parishad, of which he was one of the founders. He believed in creating an institution focused on social responsibilities. 'Focus on your goals and profits will follow' was his dictum. ==Death==