The Cerise Laboratory receives an unexpected guest as Officer Jenny arrives at their doorstep, informing Professor Cerise, Ash, and Goh that she's come here to investigate a case that's been occuring around Vermilion City. She's accompanied by the investigator in charge of solving the case, Inspector Decker, who asks for all the Electric-type Pokémon at the laboratory to be gathered together. Once all of the laboratory's Electric types have been assembled, Decker compares each of them to a sketch he has. Upon reaching Pikachu, he declares that Pikachu is the culprit, much to Ash and Goh's shock. Jenny explains that there's been a string of cases of electricity being stolen from houses around Vermilion City, with each nightly theft accompanied by an abnormal spike in power consumption. A witness had seen the silhouette of a Pokémon against a car's headlight, and the sketch Decker has was based on that testimony. Moreover, every other Pikachu in the city has an alibi, leaving Ash's Pikachu as the only Pikachu without one. Refusing to listen to any of Jenny's objections, Decker has Pikachu taken to the police station.
While Decker unsuccessfully attempts to interrogate Pikachu, Ash expresses his disbelief at Pikachu being accused of a crime. Even Officer Jenny, who knows Ash and Pikachu well, is hesitant to believe Pikachu is guilty, but the sketch is the only lead they have at the moment. Suddenly, the lights start flickering, and Pikachu senses something, running away with Ash, Goh, Jenny, and Decker following behind. Pikachu leads them to a house, whose resident says that the electricity thief just struck his house. Since Pikachu had been at the police station at the time of the crime, he now has an alibi and is cleared of suspicion.
The police searches the area, but the thief manages to slip away without a trace, despite the crime having been committed in broad daylight this time. Jenny, however, figures that since Pikachu was able to sense electricity being stolen, adding him to the investigation team could help them locate the real thief. Decker approves the idea, appointing Pikachu as a special agent for the case. Ash and Goh are also excited to join the investigation, and are allowed to borrow a pair of police uniforms to wear. However, instead of locating the thief, their patrol has them solving a number of other, smaller cases, such as finding a missing Vulpix, moving a Snorlax blocking a road, stopping a reckless Dodrio rider, leading a group of Psyduck over the road, untangling a pair of Tangela stuck together, and carrying an old woman and her Purugly across the street.
Ash and Goh are feeling exhausted, having learned through experience that police work is busier and filled with more mundane tasks than they had imagined. Jenny, nevertheless, thanks the two for their help. Just then, Pikachu senses another theft of electricity, but by the time Jenny, Ash, and Goh reach the targeted house, the thief has already gotten away. When Jenny wonders out loud if there could be any way for them to lie in wait to make catching the thief easier, Goh gets the idea of having Pikachu discharge electricity inside a house to draw the thief there. They decide to execute the idea at Chloe's home, and with Professor Cerise's permission, Pikachu starts using Thunderbolt into an electric socket, causing all the electronic devices in the household to go into overdrive.
The overly electrified house is noticed by the electricity thieves, who turn out to be a starving Team Rocket. They're stealing electricity with their electricity vacuum car in an attempt to feed the electricity to Morpeko and thus let them eat some actual food. However, since the car runs on electricity, all the electricity they've previously stolen has always been used up just to get them back to the hideout. This time, though, they intend to feed the electricity to Morpeko immediately to avoid that, and start sucking electricity from the Cerise household. As the lights go out in the house, Jenny, Ash, and Goh realize the thief is nearby. When Team Rocket attempts to feed the stolen electricity to Morpeko, it turns out to have run off to steal food from the Cerise household. As it runs back to Team Rocket, Ash and Goh realize the trio was behind the thefts, and Jenny understands that the silhouette the witness saw was not that of Pikachu, but that of Morpeko.
Jenny attempts to arrest the Rocket trio, but they escape with their car. They start firing bolts at Jenny's pursuing car to shake them off, which Jenny counters by having her Growlithe attack the trio's car with Swift. As the trio tries to regain control of their vehicle, they accidentally hit a stack of planks by the road, forcing Jenny to stop to avoid hitting the flying pieces of wood and allowing the trio to get away. They escape to an empty building and offer the stolen electricity to Morpeko. To their shock, however, Morpeko refuses it. Their Rotom Phone explains that Morpeko's hunger is specifically caused due to it creating electricity, so it needs actual food to satisfy its hunger. Ash, Goh, and Jenny arrive, but since the trio's plan has failed, they willingly give up. Meowth kicks the electricity container towards the good guys, and the electricity from it ends up getting absorbed by Pikachu, powering him up. Ash has Pikachu use a powered-up Thunderbolt, sending Team Rocket blasting off just as Inspector Decker arrives at the scene.
Later at Cerise Park, Decker presents Pikachu with a certificate of appreciation as thanks for helping to solve the case. Jenny also thanks Ash and Goh for their help, and while they got to see how hard Jenny's work can be, they still enjoyed the experience. Decker asks Pikachu if he would like to partner up with him as a special agent, but Pikachu simply shocks him in response.