DIONYSIUS, tyrant of Syracuse, was not happy, in spite of all his wealth and power. He was especially haunted by the constant fear that some one would murder him, for he had been so cruel that he had made many bitter enemies.
We are told that he was so afraid, that he never went out unless surrounded by guards, sword in hand, and never walked into any room until his servants had examined every nook and corner, and made sure that no murderer was hiding there.
The tyrant even carried his caution so far, that no one was allowed to come into his presence until thoroughly searched, so as to make sure that the visitor had no weapon hidden about his person. When his barber once jokingly said that the tyrant's life was daily at his mercy, Dionysius would no longer allow the man to shave him.
Instead of the barber, Dionysius made his wife and daughter do this service for him, until, growing afraid of them also, he either did it himself or let his beard grow.
Suspicious people are never happy; and, as Dionysius thought that everybody had as evil thoughts as himself,  he was always expecting others to rob or murder or injure him in some way.
His sleep, even, was haunted by fear; and, lest some one should take him unawares, he slept in a bed surrounded by a deep trench. There was a drawbridge leading to the bed, which he always drew up himself on his own side, so that no one could get at him to murder him in his sleep.
Among the courtiers who daily visited Dionysius there was one called Damocles. He was a great flatterer, and was never weary of telling the tyrant how lucky and powerful and rich he was, and how enviable was his lot.
Dionysius finally grew tired of hearing his flattery; and when he once added, "If I were only obeyed as well as you, I should be the happiest of men," the tyrant offered to take him at his word.
By his order, Damocles was dressed in the richest garments, laid on the softest couch before the richest meal, and the servants were told to obey his every wish. This pleased Damocles greatly. He laughed and sang, ate and drank, and was enjoying himself most thoroughly.
By chance he idly gazed up at the ceiling, and saw a naked sword hanging by a single hair directly over his head. He grew pale with terror, the laughter died on his lips, and, as soon as he could move, he sprang from the couch, where he had been in such danger of being killed at any minute by the falling sword.
Dionysius with pretended surprise urged him to go back to his seat; but Damocles refused to do so, and pointed to the sword with a trembling hand. Then the tyrant  told him that a person always haunted by the fear can never be truly happy,—an explanation which Damocles readily understood.
Since then, whenever a seemingly happy and prosperous person is threatened by a hidden danger, it has been usual to compare him to Damocles, and to say that a sword is hanging over his head.