...my first instinct was that the mesopotamians invented cuneiform as the first written language.
It appears the the Egyptians had the first alphabet, while the mesopotamains were the first to use symbols to represent something else.
-----
Mesopotamia
The original Mesopotamian writing system was initially derived from a system of clay tokens used to represent commodities. By the end of the 4th millennium BC, this had evolved into a method of keeping accounts, using a round-shaped stylus pressed into soft clay for recording numbers. This was gradually augmented with pictographic writing using a sharp stylus to indicate what was being counted. Round-stylus and sharp-stylus writing was gradually replaced by writing using a wedge-shaped stylus (hence the term cuneiform), at first only for logograms, but evolved to include phonetic elements by the 29th century BC. Around the 26th century BC, cuneiform began to represent syllables of spoken Sumerian. Also in that period, cuneiform writing became a general purpose writing system for logograms, syllables, and numbers, and this script was adapted to another Mesopotamian language, Akkadian, and from there to others such as Hurrian, and Hittite. Scripts similar in appearance to this writing system include those for Ugaritic and Old Persian.
Egypt
The earliest known hieroglyphic inscriptions are the Narmer Palette, dating to c.3200 BC, and several recent discoveries that may be slightly older, though the glyphs were based on a much older artistic tradition. The hieroglyphic script was logographic with phonetic adjuncts that included an effective alphabet.
Writing was very important in maintaining the Egyptian empire, and literacy was concentrated among an educated elite of scribes. Only people from certain backgrounds were allowed to train to become scribes, in the service of temple, pharaonic, and military authorities. The hieroglyph system was always difficult to learn, but in later centuries was purposely made even more so, as this preserved the scribes' status.
The world's oldest known alphabet was developed in central Egypt around 2000 BC from a hieroglyphic prototype, and over the next 500 years spread to Canaan and eventually to the rest of the world.