Document
late Middle English: from Old French, from Latin documentum ‘lesson, proof’ (in medieval Latin ‘written instruction, official paper’), from docere ‘teach’.
wiktionary
Borrowed from Middle French document, from Latin documentum.
etymonline
document (n.)
early 15c., "a doctrine;" late 15c., "teaching, instruction" (senses now obsolete), from Old French document (13c.) "lesson, written evidence" and directly from Latin documentum "example, proof, lesson," in Medieval Latin "official written instrument, authoritative paper," from docere "to show, teach, cause to know," originally "make to appear right," causative of decere "be seemly, fitting," from PIE root *dek- "to take, accept."
Meaning "written or printed paper that provides proof or evidence" is from early 18c., hence "anything bearing legible writing or inscription." Related: Documents.
document (v.)
1640s, "to teach with authority," a sense now obsolete; see document (n.). Meaning "to support by documentary evidence" is from 1711. Related: Documented; documenting.