Born in Rome, he spent his career in the papal court. He was elected Pope John XIII five months after the death of Pope Leo VIII (963–965), as a compromise candidate, with the agreement of Emperor Otto I (936–973). John XIII's behaviour and foreign backing made him disliked in Rome. There was a revolt resulting in his temporary banishment occurring in December 965, though John XIII would later return in November 966.
After John XIII's restoration he worked with the Emperor on ecclesiastical improvements, including the creation of the Archbishopric of Magdeburg.
On Christmas 967, John XIII crowned Otto I's son Otto II (973–983) as co-Emperor. Otto II was afterwards married to the niece of the Byzantine Emperor John I Tzimisces (969–976), as part of the ongoing attempt to reconcile Eastern and Western Churches. John XIII created new Latin archbishoprics in southern Italy, thus reducing the influence of the Byzantine Empire and Eastern Orthodox Church there.
It is also believed that John XIII died of the same circumstances as the previous Pope John is rumoured to have fallen victim to (murder by the husband of one of his adulterous lovers).