The Damascus Document [a] is an ancient Hebrew text known from both the Cairo Geniza and the Dead Sea Scrolls.   It is considered one of the foundational documents of the ancient Jewish community of Qumran. 
The Damascus Document is a fragmentary text, no complete version of which survives. There have been attempts to reconstruct the original text from the various fragments. The medieval recension appears to have been shorter than the Qumran version, but where they overlap there is little divergence.   The correct ordering of all the Qumran fragments is not certain. 
The Damascus Document's primary body of composition is a compilation of sectarian laws that have been coupled with historical information on the sect, and utilize the same figure names used in the group's pesharim commentaries. As the rules permit a woman to marry and possess private property, most scholars believe that they were composed to determine the lifestyles of the Essenes who lived in the camps and did not join the Qumran community.  The redactor of the text allows that the covenant is open to all Israelites who accept the sect's halakha, while condemning the others as the "wicked of Judah" against whom God would direct "a great anger with flames of fire by the hand of all the angels of destruction against persons turning aside from the path". The text states that those who abandon the true covenant "will not live". 
The fragments found in Cairo in 1897 were originally called the Zadokite Fragments  but after the work was found at Qumran, the name was changed because the document had numerous references to Damascus.  The way this Damascus is treated in the document makes it possible that it was not a literal reference to Damascus in Syria, but to be understood either geographically for Babylon or Qumran itself. If symbolic, it is probably taking up the Biblical language found in Amos 5:27, "therefore I shall take you into exile beyond Damascus"; Damascus was part of Israel under King David, and the Damascus Document expresses an eschatological hope of the restoration of a Davidic monarchy.
Two manuscripts (CDa and CDb) were found in Cairo, with further findings at Qumran. In contrast to the fragments found at Qumran, the CD documents are largely complete, and therefore are vital for reconstructing the text.
The main fragments were discovered by Solomon Schechter in 1897 in the Cairo Geniza, a storeroom adjoining Ben Ezra Synagogue in Fustat (Old Cairo), among over 190,000 manuscripts and fragments that were written in mainly Hebrew and Judaeo-Arabic.  The fragments were quite large, and a number of them matched documents found later in Qumran. They were divided into two separate sections, CDa, and CDb. Schechter dated CDa to the 10th century C.E and CDb to 11th or 12th century C.E.  These fragments are housed at the Cambridge University Library with the classmarks T-S 10K6 and T-S 16.311 (other references are CDa and CDb).
The combined text of CDa and CDb contains twenty columns of writing. As it has come down to us, two columns have been mislocated: columns 15 & 16 originally preceded col 9. Fragments of this text from Qumran include material not found in CD.  
The Damascus Document can be divided into two separate sections, commonly called Admonition and Laws.  Davies divides the Admonition into four sections: History, Legal, Warnings, a Supplement (which Wise refers to as exhortations).   The Admonition comprises moral instruction, exhortation, and warning addressed to members of the sect, together with polemic against its opponents; it serves as a kind of introduction to the second section. 
The Laws looks at this new covenant community expressed to them through the Teacher of Righteousness.  It goes into great detail of the different social arrangements that were taking place at the time.  The Laws feature Oaths & vows, Sundry rulings ( halakhot), Camp laws, and a fragment of Penal codes (more of which were found in the Qumran fragments ).
This part is divided into four subsections. 
A. Admonition (columns 1–8 + 19–20)
The first 12 laws are from the Damascus Document found at Qumran, while the others are from the Cairo Geniza.[ citation needed]
The Damascus Document contains prominent reference to a cryptic figure called the Teacher of Righteousness, whom some of the other Qumran scrolls treat as a figure from their past, and others treat as a figure in their present, and others still as a figure of the future. (Some of these other scrolls where he is mentioned are the Pesharim on Habakkuk (numerous times), Micah (once) and Psalms, as well as 4Q172[ clarification needed].) The document introduces the group led by the Teacher as having arisen 390 years after the first fall of Jerusalem (circa 200 BCE): "And God observed their deeds, that they sought Him with a whole heart, and He raised for them a Teacher of Righteousness to guide them in the way of His heart." On the basis of that reference, historians date the Teacher to circa 150 BCE.[ clarification needed] Scholars have also believed that he was a priest based on other variations in the text that are also thought to be him. These include: "the teacher", "the unique teacher" and "the interpreter of the law". 
This Teacher of Righteousness does not feature at all, however, in the Community Rule, another document found amongst the Qumran scrolls. To some scholars, this suggests that the two works are of different Second Temple groups. Most scholars, however, focus on the high degree of shared terminology and legal rulings between the Damascus Document and the Community Rule, including terms like sons of light, and their penal codes and on the likelihood that fragment 4Q265 is a hybrid edition of both documents. They turn to the fact that the Damascus Document describes the group amongst whom the Document was created as having been leaderless for 20 years before the Teacher of Righteousness established his rule over the group to explain that both works are from the same group under different situations.[ citation needed]
Within this approach of the majority of scholars, the textual relationship between the Damascus Document and Community Rule is not completely resolved, though there is a general agreement that they have some evolutionary connection. Some suspect that the Community Rule is the original text that was later altered to become the Damascus Document, others that the Damascus Document was redacted to become the Community Rule, a third group argues that the Community Rule was created as a utopian ideal rather than a practical replacement for the Damascus Document, and still others that believe the Community Rule and Damascus Document were written for different types of communities, one enclosed and the other open.[ citation needed]
Most scholars believe that the rules featured in the Damascus Document, which let men to marry women and own private property, were created to regulate the lifestyles of the Essenes who lived in the camps and did not join the Essene community that resided in Qumran. 
According to Boccaccini, the Damascus Document serves as a "bridge" document, connecting Judaism's post-exilic 'Enochian'-Essene majority[ clarification needed] to the asserted leadership of its radical minority Qumran– Essene community that was established in isolation near the shores of the Dead Sea.