According to legend, Chang'e and her husband Houyi were immortals living in heaven. One day, the ten sons of the Jade Emperor transformed into ten suns, causing the earth to scorch. Having failed to order his sons to stop ruining the earth, the Jade Emperor summoned Houyi for help. Houyi, using his legendary archery skills, shot down nine of the sons, but spared one son to be the sun. The Jade Emperor was obviously not pleased with Houyi's solution to save the earth: nine of his sons were dead. As punishment, the Jade Emperor banished Houyi and Chang'e to live as mere mortals on earth.
Seeing that Chang'e felt extremely miserable over her loss of immortality, Houyi decided to journey on a long, perilous quest to find the pill of immortality so that the couple could be immortals again. At the end of his quest he met the Queen Mother of the West who agreed to give him the pill, but warned him that each person would only need half the pill to become immortal.
Houyi brought the pill home and stored it in a case. He warned Chang'e not to open the case and then left home for a while. Chang'e became too curious: she opened up the case and found the pill just as Houyi was returning home. Nervous that Houyi would catch her discovering the contents of the case, she accidentally swallowed the entire pill. She started to float into the sky because of the overdose. Although Houyi wanted to shoot her in order to prevent her from floating further, he could not bear to aim the arrow at her. Chang'e kept on floating until she landed on the Moon.
While she became lonely on the Moon without her husband, she did have company. A jade rabbit, who manufactured elixirs, also lived on the Moon.
story found here