When Elsa was eight and Anna was five, the two princesses would often build snowmen due to Elsa's ability to create ice and snow. On one such occasion, Olaf was created by the two. However, shortly afterwards, Anna was struck by Elsa's magic and fell unconscious, and in Elsa's despair, she accidentally destroyed Olaf.
Several years later on, Elsa, now 21, had exiled herself from Arendelle after her magic was discovered, and she recreated Olaf using her magic. However, he was enchanted and given life, though Elsa remained unaware. Olaf wandered away form the castle and met Anna, Kristoff and Sven, who were searching for Elsa, who had accidentally cursed Arendelle. Olaf, wanting to experience summer, immediately led them back to Elsa's palace. However, after being informed that she had cursed Arendelle, Elsa lost control of her magic and struck Anna in the heart. Anna, Olaf and Kristoff were then tossed out of the castle by Elsa's snow golem Marshmallow.
After Kristoff's adopted family, made entirely of trolls, informed then that Anna would die from her frozen heart unless cured by an act of true love, Kristoff returned Anna to Arendelle so that her supposed true love, Prince Hans, would kiss her, believing it to be an act of true love. Olaf was told to hide away, but was soon discovered. He later entered the castle and found Anna, having been locked in a room by Hans, who had revealed his true intentions of ruling Arendelle. Olaf then revealed to Anna that Kristoff loved her, and the two saw Kristoff and Sven riding towards the kingdom to save Anna, and Olaf freed Anna from the room and the two set out to reunite with Kristoff.
However, Olaf was swept away by a blizzard Elsa had created, and when he returned, Anna had frozen solid after protecting Elsa from being stabbed by Hans. Olaf was devastated by Anna's death, but shortly afterwards, she returned to life, as sacrificing herself for Elsa counted as an act of true love. Elsa then managed to stop the curse inflicted upon Arendelle and returned summer, which caused Olaf to melt until Elsa created a personal flurry to keep him from melting, as well as allowing him to finally enjoy summer.