Spir was born on 15 November 1837 in his father's estates of Spirovska, near the city of Elisavetgrad (Elizabethgrad, Kherson Governorate, Russian Empire now Kropyvnytskyi, Ukraine). His father, Alexander Alexandrovich Spir, of Jewish-German descent, was a Russian surgeon—Chief Physician of the military Hospital of Odessa specifically—and former professor of mathematics in Moscow. In 1812, he received the Order of St. Vladimir, was knighted, and became councillor and member of Kherson's Governorate hereditary nobility. His mother, Helena Constantinovna Spir, daughter of the major Poulevich, was on her mother's side the granddaughter of the Greek painter Logino, who arrived in Russia under the reign of Catherine the Great. Alexander Spir gave each of his five children—four boys and one girl—names chosen in an old synaxis of the Orthodox calendar, which is the source of the curious name "Afrikan". Spir disliked his Christian name, simply signing his letters and books "A. Spir". His modesty impelled him not to use either the German "von" or the French "de"—denoting his noble status—before his family name. He described his education as follows: "I spent my childhood in the countryside and later I studied for a while in Odessa, first in a Private boarding-school and after in a Gymnasium, more or less equivalent, if I do not mistake, to a French high-school. I have not been at the University, instead I entered the Midshipmen's School in Nikolayev (now Mykolaiv), not far from the Black Sea." During this period he developed an interest in philosophy and read (in the French translation of Tissot) Immanuel Kant's "Critique of Pure Reason", which gave him the basis of his speculative thought. He later followed the readings of Descartes, David Hume, and Stuart Mill.