Born in Aachen, Pastor attended a Frankfurt gymnasium, where his teacher was Johannes Janssen. Born to a Lutheran father and a Catholic mother, Pastor was converted to Catholicism at ten, after his father's death.
Pastor studied in 1875 at Leuven, in 1875/76 at Bonn, where he became a member of the student corporation Armininia, and in 1877/78 at Vienna. Pastor taught at the University of Innsbruck, first as a lecturer (1881–87), then as professor of modern history (1887). His dissertation was titled "Die kirchlichen Reunionsbestrebungen während der Regierung Karls V" (The Church's Attempts at Reunion During the Reign of Charles V). Pastor edited his mentor Janssen's eight-volume Geschichte des deutschen Volkes (History of the German People) and published it from 1893 to 1926.
Janssen had made him aware of Leopold von Ranke's History of the Popes. This determined the field he would take for his own, becoming in a sense a Catholic anti-Ranke. His approach was that the apparent shortcomings of the Papacy have reflected flaws of their times. Pastor consulted archives throughout Catholic Europe and, during his first trip to Italy in 1881, his seriousness ensured the patronage of Pope Leo XIII, who opened to him the contents of the Vatican Library, which had previously been held unavailable to scholars.
The result of his research was his Geschichte der Päpste seit dem Ausgang des Mittelalters in sixteen volumes. The opus magnum was subsequently translated into English and published as History of the Popes From the Close of the Middle Ages.
Pastor decided to begin his work with the papacy of Pope Clement V (1305–1314) and the onset of the Avignon Papacy, so that he could concentrate his research on surviving documents. His dispassionate and frank papal history concentrated on individual popes rather than on the developments of papal institutions. Pastor's tomes span the pontificates of 56 popes, from Clement V to Pius VI.
He combined the Roman Catholic sympathies necessary for dealing with such a life's work with painstaking scholarship and erudition. He was granted privileged access to the Secret Vatican Archives, and his history, largely based on hitherto unavailable original documents, superseded all previous histories of the popes in the period he covered, which runs from the Avignon Papacy of 1305 to Napoleon's entrance in Rome, 1799.
Pastor began his work in 1886 and wrote throughout the pontificates of Leo XIII, Pius X, Benedict XV and Pius XI, publishing fifteen volumes. The 16th and final volume was published posthumously in 1930. The English translations were published between 1899 and 1953.
In 1901, Pastor was appointed director of the Austrian Historical Institute in Rome, which he headed (with an interruption 1914-1919) until his death.
He also was a member of the Emperor Franz-Joseph Academy in Prague, corresponding member of the Società Colombaria in Florence, member of the Papal Academy in Rome, of the Academy of Cracow and the Académie Royale d´Archéologie de Belgique in Antwerp. He achieved an honorary membership of the Academy of St Luke in Rome, an honorary doctorate at the University of Leuven, and membership in the historical section of the Görres Society.
He received the positions of Commander of the Papal Order of St Sylvester Pope and Martyr, of Knight of the Papal Order of Saint Pius IX, of Commander of the Austrian Order of Franz Joseph and of the Royal Italian Order of Saints Maurice and Lazarus.
Emperor Francis Joseph I elevated him to the nobility in 1908 and gave him the title Freiherr von Campersfelden in 1916. In 1921 he was appointed the Republic of Austria's ambassador to the Holy See, and died in Innsbruck in 1928.
All forty volumes of The History of the Popes are available from the Internet archive. Volumes I to VI are translated and edited by Frederick Ignatius Antrobus, volumes VII to XXIV by Ralph Francis Kerr, volumes XXV to XXXIV by Ernest Graf and volumes XXXV to LX by E. F. Peeler. The publishers vary and include, K. Paul, Trench Trübner, & Co., Routledge and K. Paul.