After experiencing a bizarre dream, Madoka Kaname, a kind 14-year-old girl, encounters a magical creature named Kyube. Madoka and her friend Sayaka Miki are offered the opportunity of gaining magical powers if they agree to make a contract with the strange little being. He will also grant them one wish, but in exchange they shall risk their lives by accepting the responsibility of fighting witches. Invisible to human eyes, witches are catalysts of despair in the areas they inhabit. An ally of Kyube, a magical girl named Mami Tomoe, befriends and encourages the two girls to accept the contract. For an unknown reason, another magical girl named Homura Akemi is determined to prevent Madoka from accepting the deal.
"The fourth true ancestor" is a legendarily strong vampire that shouldn't exist. Accompanied by the 12 "gun-beasts," this phantom vampire is said to have appeared in Japan. In order to find and kill this "fourth true ancestor," the government and the Lion King Organization order the dispatch of attack mages called "sword-maidens." For some reason an apprentice named Yukina Himeragi was chosen for the task. Wielding the strongest spiritual spear, Yukina comes to the special demon district Itokami City. There she encounters Kojou Akatsuki and learns the true nature of the "fourth true ancestor."
In the "Great Disaster," Japan has been thrown into chaos by onmyouji (a kind of magician). Harutora Tsuchimikado was born into an onmyouji family, but has no power whatsoever. His childhood friend Natsume (another member of the Tsuchimikado family) appears to him one day to take him up the promise he made long ago to become her shikigami (familiar). A battle between onmyouji is about to begin.