Baldassarre Cossa was born on the island of Procida or Ischia in the Kingdom of Naples into a noble but impoverished family. Initially he followed a military career, taking part in the Angevin-Neapolitan war. His two brothers were sentenced to death for piracy by Ladislaus of Naples.
He studied law at the University of Bologna and obtained a doctorate. In 1392 he entered the service of Pope Boniface IX, first working in Bologna and then in Rome. (The Western Schism had begun in 1378 and there were two competing popes at the time, one in Avignon supported by France and Spain, and one in Rome supported by most of Italy, Germany and England.) Still a member of the laity, he became Cardinal deacon in 1402 and Papal legate in Forlì in 1403. At this time Cossa also had some links with local robber bands, which were often used to intimidate his rivals and attack carriages. These connections added to his influence and power in the region.
He was one of the seven cardinals who, in May 1408, deserted Pope Gregory XII, and, with those following Antipope Benedict XIII from Avignon, convened the Council of Pisa, of which Cossa became the leader. The aim of the council was to end the schism; to this end they deposed Gregory XII and Benedict XIII and elected the new pope Alexander V in 1409. Gregory and Benedict ignored this decision however, so that there were now three simultaneous claimants to the Papacy.
Alexander V died soon after, and on 25 May 1410 Cossa was consecrated pope, taking the name John XXIII. He had been ordained priest only one day earlier. John XXIII was acknowledged as pope by France, England, Bohemia, Prussia, Portugal, parts of the Holy Roman Empire, and numerous Northern Italian city states, including Florence and Venice; however, the Avignon Pope Benedict XIII was regarded as pope by the Kingdoms of Aragon, Castile, Sicily and Scotland and Gregory XII was still favored by Ladislaus of Naples, Carlo I Malatesta, the princes of Bavaria, Louis III, Elector Palatine, and parts of Germany and Poland.
The Medici had supported Cossa in his campaign to become cardinal and pope. Once in office, John XXIII made the Medici Bank the bank of the papacy, contributing considerably to the family's wealth and prestige.
John had his officials sell indulgences, a controversial practice that was protested in various parts of Europe, for instance by the followers of Jan Hus in Prague.
The main enemy of John was Ladislaus of Naples, who protected Gregory XII in Rome. Following his election as pope, John spent a year in Bologna and then joined forces with Louis II of Anjou to march against Ladislaus. An initial victory proved short-lived and Ladislaus retook Rome in 1413, forcing John to flee to Florence.
In Florence he met Sigismund, who had just been crowned King of Germany and who had ambitions to become emperor. Sigismund wanted to end the schism and urged John to call a general council. John did so with hesitation, afraid that he might be deposed at the council. The Council of Constance was convened on 30 October 1413. During the third session, rival Pope Gregory XII authorized the council as well. The council resolved that all three popes should abdicate and a new pope be elected. Gregory agreed and John initially did as well, but then he fled the council, hoping that without him it would lose its authority. Instead, the council deposed him and tried him for heresy, simony, schism and immorality, finding him guilty on all counts. The last remaining claimant in Avignon, Benedict XIII, refused to resign and was excommunicated. Martin V was elected as new pope in 1417.
Cossa, as he was again, was imprisoned in Germany. He was freed in 1418 after a heavy ransom had been paid by the Medicis. In Rome he submitted to Martin V who made him cardinal bishop of Tusculum. He went to Florence and died only a few months later.
The Medicis oversaw the construction of his magnificent tomb by Donatello and Michelozzo in the Battistero di San Giovanni in Florence. Pope Martin V protested in vain against the inscription on the sarcophagus: "John the former pope".
The 1910 Catholic Encyclopedia remarks that "Undeniably secular and ambitious, his moral life was not above reproach, and his unscrupulous methods in no wise accorded with the requirements of his high office ... the heinous crimes of which his opponents in the council accused him were certainly gravely exaggerated." One of his secretaries concluded that John was "a great man in temporal things, but a complete failure and worthless in spiritual things."