Khepera is a form of the sun-god Re. Khepera was specifically the god of the rising sun. He was self-produced and usually depicted as a human with a beetle on his head, or sometimes with the beetle as his head. His name comes from the Egyptian word, kheprer or "to become".
Khepera is the manifestation of the rising sun. Khepera would roll the sun along the sky, much as the dung beetle rolls a ball of dung in front of him (sometimes the Khepera was also shown pushing the moon through the sky). This ball of dung is what it lays its eggs in. The beetle larvae eat the ball of dung after they hatch. The Egyptians would see the beetle roll a ball of dung into a hole and leave. Later, when many dung beetles emerged from the hole, it would seem as though they created themselves. Khepera also had this attribute of self-generation and self-renewal.
The particular dung beetle the Egyptians identified with Khepera was
the Scarabaeus sacer.