The episode begins at school, where Connor, Amaya and Greg are discussing their teacher. All agree that he’s cool, and that his lessons are of great value to them as heroes. Then, to their surprise, Teacher shows up and announces they will be teaching ninja moves that day. Except for Cameron, all kids consider this strange, and Amaya decides they have to investigate.
That night, when they are the PJ Masks, the three heroes visit Teacher's house, where they see Teacher practice more ninja moves, even though he should be in bed by now. They confront him, and he attempts to fight them off (but this only results in him falling to the ground). Then Night Ninja and his Ninjalinos show up, and to the PJ Masks’ surprise Teacher refers to Night Ninja as “Master”. According to Night Ninja, the teacher is secretly an evil ninja by night; something Owlette refuses to believe. The Ninjalinos trap the PJ Masks in sticky splat, after which the ninjas, and Teacher, go to Mystery Mountain.
The PJ Masks free themselves and also go to Mystery Mountain, where they confront Night Ninja again. Night Ninja keeps claiming that Teacher is a true ninja, and that none of this is his doing, but Owlette doesn’t believe him. Teacher and the Ninjalinos try to crush the PJ Masks with a large boulder, but Gekko is able to stop it with his super strength. They follow Teacher deeper into the mountain, where they find him meditating. Seeing her chance, Owlette tries to make Teacher remember who he used to be. But before she can get through to him, the Ninjalinos attack again and trap the PJ Masks in a prison.
Now that he captured the heroes, Night Ninja finally admits that he is responsible for Teacher's current behavior; weeks ago, he sent the Teeny Weeny Ninjalino to put some magic gems on Teacher's teddy bear, causing it to hypnotize Teacher into becoming a ninja at night. And now that he trapped the heroes, Night Ninja intends to hypnotize other teachers as well and have them train their classes to be ninjas too.
Catboy and Gekko try to break out of the prison, but their powers prove useless against it. When Owlette however remarks how she considers Teacher to be the best teacher ever, he briefly stops practicing his ninja moves. Realizing that they can get through to him after all, the heroes keep reminding Teacher of the things he taught them. Catboy coaxes Teacher into showing them the super sideways flip, and when he does, Catboy uses his cat stripes to make Teacher bump into the lever that opens the prison’s door.
With Teacher now on their side, the PJ Masks seek out Night Ninja. Gekko defeats the Ninjalinos, and Teacher defeats Night Ninja. Owlette removes the gems from Teacher’s teddy, restoring it to normal. With the ninjas defeated, Teacher falls asleep and the PJ Masks celebrate their victory.
The following day, Teacher has evidently forgotten about his adventures as a ninja, but is still tired from the night before.