The Egg Nogg cocktail appeared in 1862 in "How to mix drinks" by Jerry Thomas. Jerry Thomas tells us that egg noggs are of American origin, that they are eaten during Christmas in North America and in all seasons in the South. The Egg Nogg was called in Scotland "Auld man's milk".
The birth of the Egg Nogg is still debated but it seems that it was already used in the 17th century to toast. Since milk and eggs were not available to everyone at that time, this drink was aimed more at the wealthy classes or farmers.
Note that the name of this cocktail can be found in different spellings (eggnog, egg nog...), but in all the first cocktail books in the 19th century the recipe was written as "Egg Nogg".