One morning Thor awoke to discover that Mjolnir had been stolen in the night by the giants, and he was enraged. With the help of Freya, Loki shapeshifted into a bird and flew to Jotunheim, the home of the giants. There, their king, Thrym told Loki that he had stolen the hammer, and buried it 8 miles under the earth, and the only way for Thor to get his beloved hammer back was for Freya to marry Thrym.
Loki returned to Asgard with the giant's demands, and Thor decided that Freya should indeed marry the giant so he could get Mjolnir back. Freya was not impressed, and refused to marry Thrym, and suggested to Thor that he better start digging if he wanted his hammer back. Finally, Heimdall stated that the best way to deal with this situation was for Thor to don a dress and veil and trick the giant into thinking he was Freya. Thor didn't like this new plan, but Odin told him it was the best way, and Loki persuaded him, and offered to be his handmaiden.
Freya helped dress Thor in a fine gown, cap, and veil, and Loki shapeshifted into a beautiful woman to accompany him. The pair travelled to Jotunheim, and Thrym did indeed believe that Thor was Freya. He called for a wedding feast, but became very suspicious when Thor ate a whole ox and 8 salmon, and then drank 3 barrels of mead. Quick witted Loki told the giant that Freya was so excited for their marriage that she had not eaten anything for 8 days. Thrym believed this lie, and was so impressed by Freya's decidaction to their union that he asked for a kiss. When Thor lifted the veil, his eyes were blazing with fury. Once more, Thrym became suspicious, but Loki explained way Thor's murderous expression by saying that such was Freya's longing for this union that she had not slept for 8 nights.
Thrym was so pleased with the devotion of his future bride, that he called for Mjolnir to be brought forth and placed in Freya's lap so that the marriage could be blessed. As soon as the hammer was placed in Thor's lap, he pulled off his veil, took up Mjolnir, and struck Thrym until he was dead. Thor continued his rampage until all the guests were either dead or had fled. Delighted that he finally had Mjolnir back in his possession, Thor returned to Asgard with Loki.