Cicero once told the story of a tyrant king of Syracuse named Dionysius II. He had been king for 38 years – with significant wealth and fame. Yet, he lived in constant fear of those around him – he wouldn't trust a barber, he addressed the people not from a pulpit but a high tower, everyone near him was searched for weapons extensively.
Damocles, a member of Dionysius's entourage, once told the king how wonderful it seemed to be king – that no one seemed happier. Dionysius replied,
Do you wish to taste it yourself and make a trail of my good fortune?
Dionysius then made Damocles king for a day. He received the most lavish meals and gifts, and received whatever he wanted. Damocles seemed happy. Then, Dionysius ordered a sword to be hung from the ceiling over Damocles head, suspended only by a single horse-hair. With the sword over his head, Damocles couldn't enjoy any of the riches of being king and begged to return to his previous post.
The Sword of Damocles has come to represent a looming threat that prevents one from being happy.
You can read the full translation of the story in Cicero's Tusculan Disputations (part XX). Dionysius ruled nearly 300 years before Cicero wrote about him.