The contents of the codices were written in the Coptic language. The best-known of these works is probably the Gospel of Thomas, of which the Nag Hammadi codices contain the only complete text. After the discovery, scholars recognized that fragments of these sayings attributed to Jesus appeared in manuscripts discovered at Oxyrhynchus in 1898 (P. Oxy. 1), and matching quotations were recognized in other early Christian sources. Subsequently, a 1st or 2nd century date of composition circa 80 AD or earlier has been proposed for the lost Greek originals of the Gospel of Thomas. The buried manuscripts date from the 3rd and 4th centuries.

The story of the discovery of the Nag Hammadi library in 1945 has been described as 'as exciting as the contents of the find itself'.[3] In December of that year, two Egyptian brothers found several papyri in a large earthenware vessel while digging for fertilizer around the Jabal al-Ṭārif caves near present-day Hamra Dom in Upper Egypt. Neither originally reported the find, as they sought to make money from the manuscripts by selling them individually at intervals. The brothers' mother burned several of the manuscripts, worried, apparently, that the papers might have 'dangerous effects' (Markschies, Gnosis, 48). As a result, what came to be known as the Nag Hammadi library (owing to the proximity of the find to Nag Hammadi, the nearest major settlement) appeared only gradually, and its significance went unacknowledged until some time after its initial discovery.

In 1946, the brothers became involved in a feud, and left the manuscripts with a Copticpriest. His brother-in-law in October that year sold a codex to the Coptic Museum in Old Cairo (this tract is today numbered Codex III in the collection). The resident Coptologist and religious historian Jean Doresse, realizing the significance of the artifact, published the first reference to it in 1948. Over the years, most of the tracts were passed by the priest to a Cypriot antiques dealer in Cairo, thereafter being retained by the Department of Antiquities, for fear that they would be sold out of the country. After the revolution in 1952, these texts were handed to the Coptic Museum in Cairo, and declared national property.[4]Pahor Labib, the director of the Coptic Museum at that time, was keen to keep these manuscripts in their country of origin.

Jung's death in 1961 resulted in a quarrel over the ownership of the Jung Codex; the pages were not given to the Coptic Museum in Cairo until 1975, after a first edition of the text had been published. The papyri were finally brought together in Cairo: of the 1945 find, eleven complete books and fragments of two others, 'amounting to well over 1000 written pages' are preserved there.[5]

The first edition of a text found at Nag Hammadi was from the Jung Codex, a partial translation of which appeared in Cairo in 1956, and a single extensive facsimile edition was planned. Due to the difficult political circumstances in Egypt, individual tracts followed from the Cairo and Zurich collections only slowly.

This state of affairs did not change until 1966, with the holding of the Messina Congress in Italy. At this conference, intended to allow scholars to arrive at a group consensus concerning the definition of gnosticism, James M. Robinson, an expert on religion, assembled a group of editors and translators whose express task was to publish a bilingual edition of the Nag Hammadi codices in English, in collaboration with the Institute for Antiquity and Christianity at the Claremont Graduate University in Claremont, California.

Robinson was elected secretary of the International Committee for the Nag Hammadi Codices, which had been formed in 1970 by UNESCO and the Egyptian Ministry of Culture; it was in this capacity that he oversaw the project. A facsimile edition in twelve volumes was published between 1972 and 1977, with subsequent additions in 1979 and 1984 from the publisher E.J. Brill in Leiden, entitled, The Facsimile Edition of the Nag Hammadi Codices. This made all the texts available for all interested parties to study in some form.

The James M. Robinson translation was first published in 1977, with the name The Nag Hammadi Library in English, in collaboration between E.J. Brill and Harper & Row. The single-volume publication, according to Robinson, 'marked the end of one stage of Nag Hammadi scholarship and the beginning of another' (from the Preface to the third revised edition). Paperback editions followed in 1981 and 1984, from E.J. Brill and Harper, respectively. A third, completely revised, edition was published in 1988. This marks the final stage in the gradual dispersal of gnostic texts into the wider public arena—the full complement of codices was finally available in unadulterated form to people around the world, in a variety of languages. A cross reference apparatus for Robinson's translation and the Biblical canon also exists.[6]

Another English edition was published in 1987, by Yale scholar Bentley Layton, called The Gnostic Scriptures: A New Translation with Annotations (Garden City: Doubleday & Co., 1987). The volume included new translations from the Nag Hammadi Library, together with extracts from the heresiological writers, and other gnostic material. It remains, along with The Nag Hammadi Library in English, one of the more accessible volumes of translations of the Nag Hammadi find. It includes extensive historical introductions to individual gnostic groups, notes on translation, annotations to the text, and the organization of tracts into clearly defined movements.

Not all scholars agree that the entire library should be considered Gnostic. Paterson Brown has argued that the three Nag Hammadi Gospels of Thomas, Philip and Truth cannot be so labeled, since each, in his opinion, may explicitly affirm the basic reality and sanctity of incarnate life, which Gnosticism by definition considers illusory.[7]

The so-called "Codex XIII" is not a codex, but rather the text of Trimorphic Protennoia, written on "eight leaves removed from a thirteenth book in late antiquity and tucked inside the front cover of the sixth." (Robinson, NHLE, p. 10) Only a few lines from the beginning of Origin of the World are discernible on the bottom of the eighth leaf.

Although the manuscripts discovered at Nag Hammadi are generally dated to the 4th century, there is some debate regarding the original composition of the texts. A wide range and the majority of scholars date authorship of the Gnostic gospel of Nag Hammadi to the 2nd and 3rd century.[8] Scholars with a focus on Christianity tend to date the gospels mentioned by Irenaeus to the 2nd century, and the gospels mentioned solely by Jerome to the 4th century[citation needed]. The traditional dating of the gospels derives primarily from this division. Other scholars with a deeper focus on pagan and Jewish literature of the period tend to date primarily based on the type of the work[citation needed]:

The Gospel of Thomas is held by most to be the earliest of the "gnostic" gospels composed. Scholars generally date the text to the early-mid 2nd century.[9] The Gospel of Thomas, it is often claimed, has some gnostic elements but lacks the full gnostic cosmology. However, even the description of these elements as "gnostic" is based mainly upon the presupposition that the text as a whole is a "gnostic" gospel, and this idea itself is based upon little other than the fact that it was found along with gnostic texts at Nag Hammadi.[10] Some scholars including Nicholas Perrin argue that Thomas is dependent on the Diatessaron, which was composed shortly after 172 by Tatian in Syria.[11] A minority view contends for an early date of perhaps 50, citing a relationship to the hypothetical Q document among other reasons.[12]

The Gospel of the Lord, a gnostic but otherwise non-canonical text, can be dated approximately during the time of Marcion in the early 2nd century. The traditional view holds Marcion did not compose the gospel directly but, "expunged [from the Gospel of Luke] all the things that oppose his view... but retained those things that accord with his opinion" [13] The traditional view and dating has continued to be affirmed by the mainstream of biblical scholars,[14][15] however, G. R. S. MeadHis Gospel was presumably the collection of sayings in use among the Pauline churches of his day. Of course the patristic writers say that Marcion mutilated Luke's version.[16][17] have argued that Marcion's gospel predates the canonical Luke and was in use in Pauline churches.

Documents with a Sethian influence (like the Gospel of Judas, or outright Sethian like Coptic Gospel of the Egyptians can be dated substantially later than 40 and substantially earlier than 250; most scholars giving them a 2nd-century date.[19] More conservative scholars using the traditional dating method would argue in these cases for the early 3rd century.[citation needed]

^But the followers of Valentinus, putting away all fear, bring forward their own compositions and boast that they have more Gospels than really exist. Indeed their audacity has gone so far that they entitle their recent composition the Gospel of Truth Irenaeus, Adversus Haereses (3.11.9)[1]