Futurama
A Pharoah to Remember
S4 E7:
After the crew is enslaved to help build a pyramid, a suddenly motivated Bender winds up on the throne as pharaoh.
Futurama