Andromeda had the misfortune to be the daughter of the vain Cassiopeia, wife of King Cepheus of Ethiopia. As a result of Cassiopeia's boast that she was as beautiful as the Nereids (sea nymphs), Poseidon (sea god) sent a great sea monster to ravage the coastline.
An oracle told the king that the only way to get rid of the sea monster was to surrender his virgin daughter Andromeda to the sea monster; so he did, much as happened in the Roman story of Cupid and Psyche. King Cepheus chained Andromeda to a rock in the sea where the hero saw her. Perseus was still wearing the winged sandals of Hermes that he had used in the task of carefully decapitating Medusa, while watching what he was doing only through a mirror. He asked what had happened to Andromeda, then when he heard, he promptly offered to rescue her by killing the sea monster, but on condition that her parents give her to him in marriage. With her safety uppermost in their minds, they instantly agreed.
And so Perseus slew the monster, unchained the princess and brought Andromeda back to her much relieved parents.Afterwards, owever, during wedding preparations, the happy celebrating proved premature. Andromeda's fiance -- the one from before her enchaining, Phineus, showed up demanding his bride. Perseus argued that the surrender-to-her-death had invalidated the contract (and if he had really wanted her, why hadn't he slain the monster?). Then since his non-violent technique failed to persuade Phineus to gracefully bow out, Perseus pulled out the head of Medusa to show his rival. Perseus knew better than to watch what he was doing, but his rival didn't, and so, like many others, Phineus was instantly lithified.
Perseus would go on to found Mycenae where Andromeda would be queen, but first, she gave birth to their first son Perses, who stayed behind to rule when his grandfather died. (Perses is considered the eponymous father of the Persians.)
Perseus and Andromeda's children were sons, Perses, Alcaeus, Sthenelus, Heleus, Mestor, Electryon, and a daughter, Gorgophone.
After her death, Andromeda was placed among the stars as the Andromeda constellation. The monster who was sent to ravage Ethiopia was also turned into a constellation, Cetus.