The Queen Cassiopeia, wife of king Cepheus of Ethiopia, was beautiful but also arrogant and vain; these latter two characteristics led to her downfall.
The boast of Cassiopeia was that both she and her daughter Andromeda were more beautiful than all the Nereids, the nymph-daughters of the sea god Nereus. This brought the wrath of Poseidon, ruling god of the sea, upon the kingdom of Ethiopia.
Accounts differ as to whether Poseidon decided to flood the whole country or direct the sea monster Cetus to destroy it. In either case, trying to save their kingdom, Cepheus and Cassiopeia consulted a wise oracle, who told them that the only way to appease the sea gods was to sacrifice their daughter.
Accordingly, Andromeda was chained to a rock at the sea's edge and left there to helplessly await her fate at the hands of the sea monster Cetus. But the hero Perseus arrived in time, killed Cetus, saved Andromeda and ultimately became her husband.
Since Poseidon thought that Cassiopeia should not escape punishment, he placed her in the heavens tied to a chair in such a position that, as she circles the celestial pole in her throne, she is upside-down half the time. The constellation resembles the chair that originally represented an instrument of torture.