In middle school (2008) I learned about an ancient civilization that had this one custom where anyone could be the king for one day, and then at the end of that day they would be killed. What was this?

by LynchRed

Am I remembering this right? Google yields no results. I remember learning about an ancient civilization (in the context of also learning about Ancient Greece, Egypt, Assyria, etc.) that every year would hold a sort of holiday, where there would be a competition. Whoever won the competition got to be king for one day, and held all the powers of the king, but at the end of the day they were executed. Was this really a thing? If so, when and where?

Bentresh

This sounds like the "substitute king" ritual (Akkadian šar pûhi) known from Mesopotamia and the Hittite empire. There's always more to be said on the topic, but u/i-tiresias has written an excellent post about this.

Additionally, "The Substitute King and His Fate" in Mesopotamia: Writing, Reasoning, and the Gods by Jean Bottéro is a good overview of the ritual.