Ma Xiangbo was born on April 17, 1840, into a wealthy Catholic family in Dantu County, Jiangsu Province. He was baptized when he was one month old and grew up in a strict tradition of the Catholic faith. He was also educated in the Chinese classics in traditional private schools.
At the age of 12, Ma visited his married sister in Shanghai and was amazed at the level of development of the city. He asked to stay in Shanghai to enroll at the French Jesuit Institute, the Collège Saint Ignace (Xuhui Gongxue, Xuhui College), recently founded in the Xujiahui district. His years at Saint Ignace (1851-70) laid the foundations of his openness to certain Western educational principles, in particular those involved with integral human formation and education in the liberal arts.
During his studies at this institute, Ma Xiangbo not only systematically studied Chinese traditions and classics, but his education extended to Latin, Greek, mathematics, philosophy and other disciplines. In the mid-19th century China was facing the aggression of Western powers, and in this difficult situation he began to discern in what future career he could best serve his nation.
With the full support of his mother, he entered the Society of Jesus in 1862, dedicated himself to philosophical, theological and spiritual formation, obtained his doctorate with honors in 1869 and was ordained a priest in 1870.