To combat the danger known as "mad spirits," individuals created magic. Masou Academy is an institution renowned for cultivating those who excel in this field. The most powerful magical tool, Exmachina (Spirit Machine), resides within this city. Despite being unable to wield magic himself, Kazuha returned to this place after leaving once before. Through a unique ritual, he now possesses the ability to utilize a magical weapon. His motivation stems from his desire to assist his childhood companion, Kikyo. However, for reasons unknown, the weapon intended for him has taken on the form of a young girl.