Cassiopeia, having boasted herself equal in beauty to the Nereids, drew down the vengeance of Poseidon, who sent an inundation on the land and a sea-monster, which destroyed man and beast. The oracle of Ammon having announced that no relief would be found until the king exposed his daughter Andromeda to the monster, she was fastened to a rock on the shore.
Perseus, returning from having slain the Gorgon, found Andromeda, slew the monster, set her free, and married her in spite of Phineus, to whom she had before been promised. At the wedding a quarrel took place between the rivals, and Phineus was turned to stone by the sight of the Gorgon's head (Ovid, Metamorphoses v. 1).
Andromeda followed her husband to Tiryns in Argos, and became the ancestress of the family of the Perseidae through Perseus' and Andromeda's son, Perses. Perseus and Andromeda had six sons (Perseides): Perses, Alcaeus, Heleus , Mestor , Sthenelus, and Electryon, and one daughter, Gorgophone. Their descendants ruled Mycenae from Electryon down to Eurystheus, after whom Atreus got the kingdom, and include the great hero Heracles.
After her death she was placed by Athena amongst the constellations in the northern sky, near Perseus and Cassiopeia. Sophocles and Euripides (and in more modern times Corneille) made the story the subject of tragedies, and its incidents were represented in numerous ancient works of art.