Born into a middle-class Serb family, Pelagić was educated at a high school (gymnasium) in Sarajevo and went on to pursue further studies at the Grandes écoles in Belgrade, graduating from the Faculty of Theology in 1857.
His world view was greatly influenced not only by the Russian Revolutionary Democrats but by the decline of the vassal and tributary states of the Ottoman Empire.
Brooding upon what he saw as the humiliation of his native land by Turkish sultans and later by Habsburg monarchs, Pelagić conceived the idea of restoring the spirits of his countrymen by the development of their physical and moral powers through the practice of gymnastics.
He wrote pamphlets and books which brought together his study of the attitudes of the ancients toward diet, exercise and hygiene, and the use of natural methods for the cure of diseases.
From Troy he was transferred to Balikesir in the Marmara region, then back northwestern Anatolia, but this time in Bursa, and finally at the end to Kutahya, where he spent a little more than a year.
From there he went to Cetinje and assisted in the organization of the Association for Serb Liberation and Unification with Milan Kostić, Jovan Sundečić, Miša Dimitijević and many other prominent Serbian intellectuals.
Upon his return, he decided to publicly reject his monastic title of archimandrite and in the Serbian liberal journal Zastava (Flag) on 29 April (17 Julian Calendar) 1873 he announced his decision.
It was led by Pelagić and enjoyed the support of journalist-anarchists such as Manojlo Ervaćanin (1849–1909), a prominent figure in the Serbian liberation movement and member of the Bakuninist Slavonic Section, Kosta Ugrinić (1848–1933), Pera Matanović, Djoka Vlajković (1831-1883), Jevrem Marković (1839-1878), Vladimir Jovanović, and others.
After the war he returned to Belgrade where he was appointed state teacher of gymnastics, and took on a role in the formation of the student patriotic fraternities, promoting physical fitness.