late 13c., "recollection (of someone or something); remembrance, awareness or consciousness (of someone or something)," also "fame, renown, reputation;" from Anglo-French memorie (Old French memoire, 11c., "mind, memory, remembrance; memorial, record") and directly from Latin memoria "memory, remembrance, faculty of remembering," abstract noun from memor "mindful, remembering," from PIE root *(s)mer- (1) "to remember."
Sense of "commemoration" (of someone or something) is from c. 1300. Meaning "faculty of remembering; the mental capacity of retaining unconscious traces of conscious impressions or states, and of recalling these to consciousness in relation to the past," is late 14c. in English. Meaning "length of time included in the consciousness or observation of an individual" is from 1520s.
I am grown old and my memory is not as active as it used to be. When I was younger I could remember anything, whether it had happened or not; but my faculties are decaying now and soon I shall be so I cannot remember any but the things that never happened. It is sad to go to pieces like this, but we all have to do it. [Mark Twain, "Autobiography"]
Meaning "that which is remembered; anything fixed in or recalled to the mind" is by 1817, though the correctness of this use was disputed in 19c. The word was extended, with more or less of figurativeness, in 19c. to analogous physical processes. Computer sense, "device which stores information," is from 1946. Related: Memories.