Disappointed by his lack of male heirs, Acrisius asked an oracle if this would change. The oracle told him that one day he would be killed by his daughter's child. She was childless and, meaning to keep her so, he shut her up in a bronze tower or cave. But Zeus came to her in the form of rain or a shower of gold, and impregnated her. Soon after, their child Perseus was born.
None too happy, but unwilling to provoke the wrath of the gods by killing his offspring, Acrisius cast the two into the sea in a wooden chest. The sea was calmed by Poseidon at the request of Zeus and the pair survived. They washed ashore on the island of Seriphos, where they were taken in by Dictys, the brother of King Polydectes, who raised the boy to manhood.
Later, after Perseus killed Medusa and rescued Andromeda, the oracle's prophecy came true.
He started for Argos, but learning of the prophecy instead went to Larissa, where athletic games were being held. By chance Acrisius was there, and Perseus accidentally struck him with his javelin (or discus), fulfilling the prophecy. Too shamed to return to Argos he then gave the kingdom to Megapenthes, son of Proetus (Acrisius' brother) and took over his kingdom of Tyrins, also founding Mycenae and Midea there.
Apollodorus. Bibliotheke IV, 1-3.