The terms "first" and "second" in these two titles are "scholarly conventions to distinguish the two,"1 not meant to indicate the date of origin. Instead, they reflect their original ordering in Codex V of the Nag Hammadi documents, in which the First Apocalypse precedes the Second Apocalypse. Still, this ordering was no accident:
The presence and order of the two James apocalypses in Codex V are undoubtedly due to deliberate scribal organization. The two apocalypses stress different aspects of the James tradition and actually complement one another. The setting of 1 Apoc. Jas. emphasizes the period prior to the suffering of James, while 2 Apoc. Jas. describes his suffering and death in line with the predictions in 1 Apoc. Jas.2
Next we can turn to the dating of the works. There is little certainty about the dating, but the Second Apocalypse is generally dated before the First Apocalypse based on comparisons of the texts to those of other early movements. Thus Robinson writes, regarding the Second:
The absence of allusions to the later developed gnostic systems, and the almost total absence of allusions to the New Testament tradition suggest an early date for the origin of the tractate.2
Primarily on this basis, numerous scholars date the text to the early or middle second century.3 4
On the other hand, the final text of the First Apocalypse reveals some similarities to Valentinian writings:
The Valentinian theologoumena utilised in it (cf. especially the doctrines of an upper and a lower Sophia, or of 'Sophia' proper and Achamoth', which also occur in the text outside the mystery formulae quoted: p. 36.5, 8) seem to presuppose the fully-developed Valentinian system, and therefore suggest the composition of the document at the earliest towards the end of the 2nd century.5
Similarly, "the rejection of a bodily fraternal relationship between Jesus and James (p.24.15f.)"5 points to a later date.
The names of these two works are based on the order in which the appear in the codex in which they were originally found. This seems to have been the deliberate ordering of a scribe based on their contents, not the presumed date of origin.
Textual analysis points to an earlier date for the Second Apocalypse due to its lack of allusion to early Gnostic texts, as compared to the use of developed Valentinian thought in the First Apocalypse. Thus the Second Apocalypse is dated to early or middle second century, while the First Apocalypse is dated to the late second century at the earliest.
Mercer Dictionary of the Bible, 427
Robinson, Nag Hammadi Library in English, 270
Myllykoski, "James the Just in History and Tradition," part II, Currents in Biblical Research 6.1 (2007), 54
Funk, in Schneemelcher, New Testament Apocrypha, 328
Funk, in Schneemelcher, New Testament Apocrypha, 315