Born in Carpineto Romano, near Rome, Giuseppe was one of the seven sons of Count Dominico Ludovico Pecci and his wife Anna Prosperi Buzi, Countess Pecci. From 1807 to 1818 he lived at home with his family. Together with his younger brother Vincenzo, he studied in the Jesuit College in Viterbo from 1818 until 1824. In 1824, Count Pecci called him and Vincenzo home to Rome, where their mother was dying; the father wanted his children to be with him after the loss of his wife, and so they remained in Rome, attending the Collegium Romanum, a college belonging to the Society of Jesus. In 1828, the question of occupational choice arose for the two brothers; Giuseppe Pecci professed the Jesuit order, while Vincenzo decided in favour of a diocesan priest.
Professor
Pecci taught Thomism, the theology and philosophy of St. Thomas Aquinas, at the Pontifical Gregorian University in Rome in 1847. At the request of his brother, who became Archbishop of Perugia, he was made a professor at the theological seminary in Perugia, where he remained from 1852 through 1859. After the city was taken over by Piedmont forces in 1860, Pope Pius IX called him to Rome and offered him a professorship in theology at La Sapienza University. Pope Pius also called him into the papal commission to prepare the First Vatican Council. Good Thomist theology was hard to come by at that time, with the result that young scholars from other countries were sent to Rome to learn from Pecci and Tommaso Maria Zigliara. In 1870 he resigned his professorship because he refused to take the anti-papal oath which was demanded by the new Italian government. He continued his prominent theological research independently.
Cardinal
In 1879, the College of Cardinals, led by Camillo, Cardinal di Pietro, insistently asked Pope Leo XIII to elevate his brother to their ranks, and at the age of 71 Giuseppe Pecci was created Cardinal-Deacon of Sant'Agata dei Goti on 12 May 1879 in his brother's first consistory. He was the last member of a Pope's family elevated to the cardinalate. The ceremony was described by Ludwig von Pastor in his diary: On 15 May at 11 am, Pope Leo XIII entered the hall in pontifical vestments, before him the College of Cardinals. The Swiss Guards stood to attention. After the Papal speech, each of the new cardinals, Pecci, John Henry Newman, Joseph Hergenröther and Tommaso Maria Zigliara, received the red hat, all of whom being well-known Church scholars.
Thomism
The elevation of Pecci, a well-known Thomist, took place in the context of the determined efforts of Leo XIII to foster science and Thomist theology throughout the Catholic Church . Thomism had lost its role as a leading theology and Leo attempted to re-establish it "for the protection of faith, welfare of society and the advancement of science". What he envisaged were not sterile interpretations of it, but a return to the original sources. This new orientation at the beginning of his pontificate was welcomed by Dominicans, Thomist Jesuits like Pecci and numerous bishops throughout the world. Strong opposition also developed as well on several fronts within the Church: Some considered Thomism simply outdated, while others used it for petty condemnations of dissident views that they did not like. As traditional antagonists, Jesuits and Dominicans both claimed leadership in the renewal of Catholic theology.
Papal Collaboration
Pope Leo responded with the encyclical Æterni Patris, much of which was co-written by Cardinal Pecci on the restoration of Christian philosophy in the schools, which was published on 4 August 1879, and mandated all Catholic universities to teach Thomism; it also created a papal academy for the training of Thomist professors and publishing scholarly editions of the works of St Thomas Aquinas. The leadership of this academy he entrusted to his brother, who aided the creation of similar Thomas Aquinas academies in other places. In 1879, Cardinal Pecci was appointed as first Prefect of the Pontifical Academy of St. Thomas Aquinas, which Leo founded on 15 October 1879, and was also appointed Prefect of the Congregation for Studies in February 1884 . Pope Leo XIII appointed thirty members, ten each from Rome, from Italy, and from the rest of the world, and provided generous financial support to attract scholars from everywhere. The Pope also personally supported individual Thomist scholars and applauded numerous critical editions of the Angelic Doctor's texts. To balance his Thomist Jesuit appointments, Leo entrusted the overall responsibility of the works of St Thomas Aquinas to the Dominican Order, of which the saint had been a member.
Pope Leo XIII considered the mostly locked-up and neglected Vatican Library as "an infinite treasure for the Church and a monument to its role in culture and science". He greatly increased staff and organization and appointed Jesuit father Franz Ehrle and Giuseppe Pecci to head the new undertaking as prefect and librarian, respectively. They in turn opened the Vatican Library to the general public after establishing a consultation library of 300,000 volumes.
Death
Cardinal Pecci continued his work as congregation and academy prefect and librarian until he died on 8 February 1890, of complications from pneumonia. His body lay in repose in the Basilica of the Twelve Apostles in Rome, where his funeral took place on 12 February. He is buried in the chapel of the Society of Jesus in Campo Verano Cemetery, in Rome .