He succeeded his father as King of Sicily in 1285. Upon the death of his brother Alfonso III in 1291, he succeeded also to the throne of the Crown of Aragon. He spent May of that year in Catania, inspiring the local monk Atanasiu di Iaci to write the Vinuta di re Iapicu about his time there. By a peace treaty with Charles II of Anjou in 1296, he agreed to give up Sicily, but the Sicilians instead installed his brother Frederick on the throne.
Due to the fact that Frederick, would not withdraw from the island, Pope Boniface VIII asked James II, along with Charles II of Naples, to remove him. As an enticement to do this the Pope invested James II with the title to Sardinia and Corsica, as well as appointing him Papal Gonfalonier. Because of his inability to disguise his apathy on the matter, he returned to Aragon. Frederick reigned there until his death in 1337.
During the period that followed his return to Aragon, James II wanted to gain access to the Muslim world in the south, from which Castile restricted Aragon. In order to achieve this goal, and assisted by his Admiral Don Bernat de Sarrià, Baron of Polop, he formed an alliance with the enemies of the adolescent king of Castile, Ferdinand IV. James II wanted Murcia in order to give his kingdom access to Granada. The allied forces entered from all directions in 1296, where James II was victorious in capturing Murcia and holding it until 1304.
James begins by comparing the Church to a ship in a storm, poorly guided by its pilot (nauchier, i.e. the Pope):
Mayre de Deu e fylha,
verge humil e vera,
vostra nau vos apela
que l'aydetz, quar perylha.
Mother of God and daughter,
virgin humble and true,
your ship appeals [cries out] to you
that you help it, because it is imperiled.
The literary quality of the verses is neither astounding nor disappointing, but the song was clearly written at a moment when James was in conflict with the Papacy, perhaps with a propagandistic end, to prove his piety and fidelity to the Church if not the Papacy. The final verses ask Mary to protect him, the king, from sin:
Mayre, tu·m dona forsa
contra ma leugeria,
e·m garda de la via
de peccat, que.ns exylha.
Mother, grant me power
against my weakness,
and guard me from the way
of sin, that destroys.
Marriages, concubines, and children
He married four times:
— Isabella of Castile, Viscountess of Limoges, daughter of Sancho IV of Castile and his wife María de Molina. The wedding took place in the city of Soria, in 1 December 1291 when the bride was only 8 years old. The marriage, which was never consummated, was dissolved and annulled after Sancho's death in 1295, when James chose to change his alliances and take advantage of the turmoil inside Castile.
James (Jaume) (b. 29 September 1296 – d. Tarragona, July 1334). James renounced his right to the throne in 1319 to become a monk. He refused to consummate his marriage to Eleanor of Castille, who later become the second wife of his brother Alfonso.
Alfonso IV of Aragon (1299 – 24 January 1336). He became the King of Aragon in 1327 and ruled until his death. He married twice: first Teresa d'Entença and then Eleanor of Castile after his first wife died.
Alphonse (b. 1332 - d. 5/7 March 1412), 1st Duke of Gandia, 1st Marquess of Villena de Castilla, 2nd Count of Ribagorza and Empúries, etc, Constable of Castile, married in 1355 Violante Ximénez de Arenós, daughter of Gonzalo Díez de Arenós, Baron of Arenós, and wife María or Juana de Cornell, had issue
Juan (b. 1335, d. 1414), 2nd Count of Prades, Seneschal of Catalonia, married his sister-in-law Sancha Ximénez de Arenós, had issue
Blanche (b. 1307 – d. Barcelona, 1348), Prioress of Sixena.
Ramon Berenguer (b. August 1308 – d. a priest at Barcelona, 1366), Count of Empúries and Baron of Ejerica. Ramon married firstly with Blanca, daughter of Philip I of Taranto, and secondly with Maria, daughter of Jaime of Aragon.
Constable, Medieval Iberia, University of Penn. Press, 1997, pg. 394.
A short analysis, with useful footnotes, and eight lines quoted with Catalan translation is found in Martín de Riquer (1964), Història de la Literatura Catalana, vol. 1 (Barcelona: Edicions Ariel), pp. 172–73.