Hieroglyphs emerged from the preliterate artistic traditions of Egypt. For example, symbols on Gerzean pottery from ca. 4000 BCE resemble hieroglyphic writing. In 1998, a German archaeological team under Günter Dreyer excavating at Abydos uncovered tomb U-j of a Predynastic ruler, and recovered three hundred clay labels inscribed with proto-hieroglyphs, dating to the Naqada IIIA period of the 33rd century BCE. The first full sentence written in hieroglyphs so far discovered was found on a seal impression found in the tomb of Seth-Peribsen at Umm el-Qa'ab, which dates from the Second Dynasty. In the era of the Old Kingdom, the Middle Kingdom and the New Kingdom, about 800 hieroglyphs existed. By the Greco-Roman period, they numbered more than 5,000.
Most scholars believe that Egyptian hieroglyphs "came into existence a little after Sumerian script, and, probably, invented under the influence of the latter", and that it is "probable that the general idea of expressing words of a language in writing was brought to Egypt from Sumerian Mesopotamia." However, given the lack of direct evidence, "no definitive determination has been made as to the origin of hieroglyphics in ancient Egypt." Instead, it is pointed out and held that "the evidence for such direct influence remains flimsy” and that “a very credible argument can also be made for the independent development of writing in Egypt..." Recent discoveries such as the Abydos glyphs "challenge the commonly held belief that early logographs, pictographic symbols representing a specific place, object, or quantity, first evolved into more complex phonetic symbols in Mesopotamia."
Hieroglyphs consist of three kinds of glyphs: phonetic glyphs, including single-consonant characters that function like an alphabet; logographs, representing morphemes; and determinatives, which narrow down the meaning of logographic or phonetic words.
As writing developed and became more widespread among the Egyptian people, simplified glyph forms developed, resulting in the hieratic and demotic scripts. These variants were also more suited than hieroglyphs for use on papyrus. Hieroglyphic writing was not, however, eclipsed, but existed alongside the other forms, especially in monumental and other formal writing. The Rosetta Stone contains three parallel scripts – hieroglyphic, demotic, and Greek.
Hieroglyphs continued to be used under Persian rule, and after Alexander the Great's conquest of Egypt, during the ensuing Macedonian and Roman periods. It appears that the misleading quality of comments from Greek and Roman writers about hieroglyphs came about, at least in part, as a response to the changed political situation. Some believe that hieroglyphs may have functioned as a way to distinguish 'true Egyptians' from some of the foreign conquerors. Another reason may be the refusal to tackle a foreign culture on its own terms which characterized Greco-Roman approaches to Egyptian culture generally. Having learned that hieroglyphs were sacred writing, Greco-Roman authors imagined the complex but rational system as an allegorical, even magical, system transmitting secret, mystical knowledge.
By the 4th century, few Egyptians were capable of reading hieroglyphs, and the myth of allegorical hieroglyphs was ascendant. Monumental use of hieroglyphs ceased after the closing of all non-Christian temples in 391 CE by the Roman Emperor Theodosius I; the last known inscription is from Philae, known as The Graffito of Esmet-Akhom, from 394 CE.