The Empire of Britannia has invaded Japan using giant robot weapons called Knightmare Frames. Japan is now referred to as Area 11, and its people the 11's. A Britannian who was living in Japan at the time, Lelouch, vowed to his Japanese friend Suzaku that he'd destroy Britannia. Years later, Lelouch is in high school, but regularly skips out of school to go play chess and gamble on himself. One day, he stumbles on terrorists 11's who've stolen a military secret and is caught by a member of the Britannian task force sent after them, who is Suzaku. As the rest of the squad arrives, Suzaku is shot for disobeying orders, while the military secret, a young girl, gives Lelouch the power of Geass, which makes anyone obey any order. While Suzaku is secretly made the pilot of Britannia's brand new prototype Knightmare, Lancelot, Lelouch becomes the masked Zero to lead the rebellion to destroy Britannia once and for all.
It's been one year since the failure of the Black Rebellion and the supposed death of Zero. Britannia has assigned Area 11 a "correctional education" status, where Elevens are made an example of by brute force, to try to prevent any future uprisings and suppress rebellious thoughts. Unsuspecting high school student Lelouch, oblivious to his rebellious past as Zero, stumbles upon a scheme on his life and the life of a mysterious woman known as C.C., who reveals to him his forgotten purpose and his "true" self. Destroying his assailants and declaring himself Zero once again, Lelouch sets out to finish what he started.
The Japanese Ministry of Defense has an anti-paranormal special forces group called the Paranormal Disaster Countermeasure Headquarters. They're the ones responsible to protect Japanese soil and its people from supernatural and paranormal events. However, things didn't go so well in one of their missions, which leads to intervention by the Ministry of Enviroment's Supernatural Disaster Countermeasures Division after the PDCH has sustained large numbers of casualties battling demons.
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.