The first version, forced against her will.
Hou Yi became famous for shooting the sun, and many people came to apprentice under him, among them was the dishonest Feng Meng.
Hou Yi obtained a packet of the Elixir of Immortality from the Queen Mother of the West and entrusted it to Chang'e for safekeeping. Feng Meng seized the opportunity when Hou Yi was away to coerce Chang'e into handing over the Elixir of Immortality. In a moment of crisis, Chang'e swallowed the Elixir, and soon she floated off the ground, ascending to the moon and becoming a fairy.
The second version, abandoning her husband to take it alone. Chang'e knew her husband Hou Yi had begged the Elixir of Immortality from the Queen Mother of the West, eager to become immortal. One day, she stole and consumed the Elixir while Hou Yi wasn't paying attention, then flew to the Moon Palace.
