Alfonso de Borgia was born in La Torreta in 1378. La Torreta was at the time in the Señorío de Torre de Canals (but is now a neighborhood of Canals in Valencia). At the time he was born in the Kingdom of Valencia under the Crown of Aragon.
He was the son of Juan Domingo de Borgia y Doncel and Francina Llançol. He was the eldest child and his siblings were Isabel, Juana, Catalina and Francisca. He was baptized at Saint Mary's Basilica in Xativa, where he is now honored with a statue in his memory.
Borgia studied grammar, logic and the arts in Valencia and went in 1392 to the University of Lleida where he obtained a doctorate in both canon law and civil law. His early career was spent as a professor of law at the University of Lleida. Around 1411, he attended a sermon by Vincent Ferrer. Afterward, the Dominican said to the future pope: "My son, you one day will be called to be the ornament of your house and of your country. You will be invested with the highest dignity that can fall to the lot of man. After my death, I shall be the object of your special honour. Endeavor to persevere in a life of virtue." Later, as pope, Borgia canonized Ferrer on 3 June 1455.
Borgia was chosen as a delegate of the Diocese of Lerida to the Council of Constance in 1416, but did not partake in the proceedings as King Alfonso V of Aragon was opposed to the council. Because of this he went to Barcelona as a representative of his diocese in a synod. Borgia cared strongly for the reestablishment of the unity of the church and his influence with the Aragonese monarch was the factor that allowed for the conclusion of the accord between the king and the new pope.
In 1418 he was named as the rector of San Nicolas of Valencia. He was also the Vice-Chancellor of the University of Lerida from 1420 to 1423. In 1424 he resigned his position and dedicated his service to the Aragonese king. In 1424 he was named as the apostolic administrator of the see of Mallorca. It was at that time that the king desired that he be made a Cardinal; Pope Martin V refused the request. During the Great Western Schism he supported Antipope Benedict XIII and was also the driving force behind Antipope Clement VIII's submission to Pope Martin V in 1429. He then served as a diplomat to the Kings of Aragon, especially during the Council of Basel (1431–1439).
Episcopate and cardinalate
Borgia was appointed Bishop of Valencia by Pope Martin V on 20 August 1429 and was consecrated on 31 August 1429. He authorized Pedro Llorens to take possession of the see in his name. Borgia also tutored Alfonso V's illegitimate son Ferrante.
Pope Eugene IV elevated him to the cardinalate on 2 May 1444 after he managed to reconcile the pope and King Alfonso V of Aragon. He was elevated as the Cardinal-Priest of Santi Quattro Coronati. He took up his official residence in Rome and was a member of the Roman Curia. He participated in the papal conclave of 1447 that saw the election of Pope Nicholas V. He was known for an austere and charitable life.
Borgia's coat of arms after he was consecrated featured a grazing ox. As pope it remained the same.