where does this myth originate from?
The earliest mentions of the Osiris myth are in the Pyramid Texts, the first Egyptian funerary texts.
Osiris myth
The earliest mentions of the Osiris myth are in the Pyramid Texts, the first Egyptian funerary texts, which appeared on the walls of burial chambers in pyramids at the end of the Fifth Dynasty, during the 24th century BCE. 
which egyptian god was bitten by a snake Horus. what is the osiris myth? It is the most elaborate and influential story in ancient Egyptian mythology. It concerns the murder of the god Osiris, a primeval king of Egypt, and its consequences.
wiki:11547289
Osiris myth [SEP] Sources
Nevertheless, the fragmentary versions, taken together, give it a greater resemblance to a cohesive story than most Egyptian myths. The earliest mentions of the Osiris myth are in the Pyramid Texts, the first Egyptian funerary texts, which appeared on the walls of burial chambers in pyramids at the end of the Fifth Dynasty, during the 24th century BCE. These texts, made up of disparate spells or "utterances", contain ideas that are presumed to date from still earlier times. The texts are concerned with the afterlife of the king buried in the pyramid, so they frequently refer to the Osiris myth, which is deeply involved with kingship and the afterlife.