Recap / Puella Magi Madoka Magica Episode 12 My Very Best Friend
aka: Puella Magi Madoka Magica Episode 12

Madoka makes the decision to become a magical girl, wishing to prevent all witches from the past, present and future from coming into existence in the first place, a wish made possible by the massive power inside her. As she makes the transformation, her consciousness is greeted by Mami and Kyōko. Becoming a god-like entity and defeating Walpurgisnacht, Madoka spreads herself across space and time, preventing fallen magical girls from becoming witches by absorbing their despair and having them disappear peacefully. Homura is taken to a place outside of time where she witnesses Madoka exterminating the witch born from her own comet-sized Soul Gem. In doing this, Madoka starts to fade into a higher plane of existence, present at all points in all spacetimes but absent from human memory and perception. Madoka leaves Homura with a ribbon so that she will not forget her. Madoka then leaves and joins Sayaka, who ultimately had to succumb to a magical girl's fate as Madoka had chosen to respect the wish she made to heal Kyosuke. Homura returns to a world where Madoka does not exist, but Mami and Kyōko are still alive, but only Homura retains memories of Madoka. She has a short chat with Madoka's brother, who remembers her as well, but he's a small child and his parents think Madoka is his imaginary friend. She and other magical girls continue to fight against wraiths formed from the negative emotions of humanity, but thanks to Madoka's efforts, magical girls disappear instead of becoming witches after exhausting their hope. Despite being alone and facing these new enemies, Homura remains firm in protecting the city that Madoka loved.