Prof Costa Ricky Mahalu was born on July 9, 1948 at Katunguru Village in Sengerema District, Geita Region. The region was then in the former Lake Province. After completing his primary education, Mahalu joined Kibaha Secondary School, where he completed ordinary level of secondary education before joining Mkwawa High School.
In 1971, he joined Makutupora National Service Camp in Dodoma for basic military training before enrolling at the University of Dar es Salaam (UDSM) from where he graduated with a law degree in 1974.
In 1975, Mahalu was employed by UDSM as assistant lecturer in the Faculty of Law. He studied for his second law degree from 1976 to 1978 while still teaching at the university. In 1979, he went to Hamburg, West Germany, where he obtained a doctorate degree in 1983. He then returned to UDSM and was promoted to senior lecturer.
In 1990, he went to Germany where he was employed as a lecturer, but returned to UDSM after one year and was appointed law professor. After working for one and a half years, he was appointed Director for Higher Education, a post which served in from 1992 to 1996.
In October 1996, he was transferred to the Foreign Affairs ministry, and was later posted to Germany as an assistant to the ambassador. In 1999, he was appointed Tanzanias ambassador to Italy, where he served from 2000 to 2006.
Prof Mahalu also worked as a law lecturer at the St Augustine University of Tanzania.