He was the second and longest-reigning Avignon Pope, elected by the Conclave of Cardinals, which was assembled in Lyon through the work of King Louis X's brother Philip, the Count of Poitiers, later King Philip V of France. Like his predecessor, Clement V, Pope John centralized power and income in the Papacy and lived a princely life in Avignon. He opposed the political policies of Louis IV of Bavaria as Holy Roman Emperor, which prompted Louis to invade Italy and set up an antipope, Nicholas V.
Pope John XXII faced controversy in theology involving his views on the Beatific Vision, and he opposed the Franciscan understanding of the poverty of Christ and his apostles, famously leading William of Ockham to write against unlimited papal power. He canonized St. Thomas Aquinas.
Duèze taught both canon and civil law at Toulouse and Cahors. On the recommendation of Charles II of Naples he was made Bishop of Fréjus in 1300. In 1309 he was appointed chancellor of Charles II, and in 1310 he was transferred to Avignon. He delivered legal opinions favorable to the suppression of the Templars, but he also defended Boniface VIII and the Bull Unam Sanctam. On 23 December 1312, Clement V made him Cardinal-Bishop of Porto-Santa Rufina.
The death of Pope Clement V in 1314 was followed by an interregnum of two years due to disagreements between the cardinals, who were split into two factions. After two years, Philip, in 1316, finally managed to arrange a papal conclave of twenty-three cardinals in Lyon. This conclave elected Duèze, who took the name John XXII and was crowned in Lyon. He set up his residence in Avignon rather than Rome, continuing the Avignon Papacy of his predecessor.