In most myths, Cancer was identified by the giant crab that Hercules (Greek mythology) stepped on and killed while fighting the Hydra. Never was there a more pathetic character in all of mythology. The crab literally pinches Hercules' toe, to which Hercules just crushes him, and that's the end of that. Supposedly the Greek goddess Hera felt bad and put him in the sky.
And quite frankly, not a very good story. Luckily, I was able to find a rare but different version. Here we get a brand new look, and honestly, a much better explanation behind the mythology of Cancer.
According to the this myth, a giant crab named Crios guarded the sea nymphs in the Greek god Poseidon's kingdom. He was enormous and strong, and Poseidon himself had blessed him with immortality.
When the god of monsters Typhon (Greek mythology) terrorized the gods of Olympus, Poseidon, along with most of the other gods, went into hiding. He left Crios in charge of protecting the sea nymphs, who were considered to be Poseidon's daughters. The crab took his role as protector very seriously, and wouldn't let any of the sea nymphs outside of his reach. After a while, some of the sea nymphs became restless, and convinced that they were in no danger from Typhon, escaped into the open sea.
Crios could not chase them as he was charged with protecting the other sea nymphs, so he enlisted the help of the giant squid, Vamari. Little did he know that Vamari (whose name translates to "Vampire Squid") had ill intentions, and when he caught up to the sea nymphs, he devoured them.
When Vamari returned to Crios, he told the crab that despite a valiant effort, he could not find any of the missing sea nymphs. Crios knew that he was lying and attacked him. They battled for hours until the crab finally won. But he had sustained such bad injuries that he was terribly crippled from that time forward. Since he was immortal, though, he could not die, but had to live in pain.
When Poseidon returned he saw the bravery that the crab had shown and relieved him of his pain, but not his immortality, by placing him in the sky as the constellation Cancer.