The son of Shyam Sundar Ray, he belonged to a family originated from Subhaddya in Keraniganj, Dhaka. He was a student of Pogose School in Dhaka. He was attracted towards the Brahmo Samaj early in life. His family were observant Hindus of high caste, whereas the Brahmo Samaj was a radical reformist sect closely aligned with Christian missionaries; many of the leaders of the Brahmo sect were converts to Christianity. Roy's attraction for the Brahmo Samaj alienated his from his family and he was turned out of his home. The well-funded Christian missionaries gave him support and patronage; guided by his new friends, he won the Gilchrist Scholarship to go to England. He graduated from the University of London in 1873. He was awarded the D.Sc. degree in Psychology from the University of Edinburgh and the University of London in 1876. He and Ananda Mohan Bose got together to establish a Brahmo Samaj, Indian Association and a library in the United Kingdom.
Teaching career
On returning to India, Roy taught at Patna College, Dhaka College and Presidency College, Kolkata. He was the first Indian to serve as principal of Presidency College from 1902 to 1905. Thereafter, he became Registrar of the University of Calcutta and on retirement served as Inspector of Colleges under the University. He was posted to England for two years as education assistant to the Secretary for India. Roy was active in the affairs of the Sadharan Brahmo Samaj. He was secretary of the Dhaka chapter of the Brahmo Samaj, and secretary and president of Sadharan Brahmo Samaj, Kolkata, for some time. He and his wife used to stay or visit regularly Hazaribagh, which had a small Brahmo community.
Family
Roy's education in London and links with the British establishment made him a prize catch for marriage, and his estrangement from his family was an advantage in this context. He married Sarala, a daughter of Durga Mohan Das, who was a convert to Christianity and a leading stalwart of the Brahmo Samaj. The marriage connected Roy to many leading lights of Bengali society who prospered under the colonial regime after accepting English education and a huge dose of European culture, not least in matters of religion. His wife Sarala was a sister of Abala Bose, wife of scientist Jagadish Chandra Bose; among her cousins were Deshbandhu Chittaranjan Das and Sudhi Ranjan Das. Roy and Sarala became the parents of two daughters, Charulata Mukherjee and Swarnalata Bose. Roy gave his daughter Charulata in marriage to Satish Chandra Mukherjee, the educationist; they became the parents of Air Marshal Subroto Mukerjee, first Indian Chief of Air Staff, the feminist and politician Renuka Ray and Prasanta Mukherjee, a General Manager employed by the Bengal Nagpur Railways. Roy's other daughter Swarnalata Bose was the mother of five children, two sons, namely Akshay Kumar Bose and Jagat Kishore Bose, and three daughters, being Kamala Dutt, Manorama Bose and Anila Khastgir.