In the Pyramid Texts, the Four Sons of Horus appear to help a dead pharaoh get to heaven. They offer him ladders made out of snakes so he can climb up to the stars and join the gods in Ra's sun boat.
The oldest-known canopic jars were found in the tomb of Queen Hotepheres I. She was Pharaoh Khufu's mother, and he had her buried near his own Great Pyramid with only the best objects, including a gorgeous set of jars to hold her mummified organs. However, these jars didn't have fancy shmancy lids like they would have in later times.
The Four Sons appear as jars holding the viscera and also as gods wrapped like mummies, standing on the sides of a coffin (Imsety and Duamutef on the east or front of the coffin, and Hapy and Qebhsenuef on the west or back of the coffin). They are also associated with the cardinal directions around this time: Duamutef in the east, Qebhsenuef in the west, Imsety in the south, and Hapy in the north. Don't lead us astray, sons.
After being identical jars with flat lids and then jars with human heads and occasionally Anubis heads, suddenly the canopic jars get four different lids: one representing each of the Four Sons of Horus. This continues through Egyptian history. The guardian goddesses (Isis, Nephthys, Neith, and Serqet), who take care of the Four Sons, also start appearing in funeral furniture, like on the four edges of coffins and sarcophagi. It's a party up in there.
Either because they were in a hurry, lazy, or preferred their new way of doing things, embalmers stopped taking the organs out of mummies. Instead, they mummified them, wrapped them in linen, and put them back in the body. Since the canopic jars were no longer needed, but nobody wanted to offend the Four Sons, they still put jars in the tomb—but these were fake jars that weren't even hollow. Ripoff!