In Gulfport, Mississippi, twelve-year-old Ben Landry watches proudly as Hero, a decorated black Labrador who served as both a K-9 law enforcement dog and a search-and-rescue dog on the Gulfport police force, receives a Medal of Honor at his retirement ceremony. Hero once saved Ben's life when Ben was six and wandered into the woods at night. After the ceremony, Ben's father, Sergeant Dave Landry, surprises Ben by giving him Hero as his own dog, with conditions: Ben must keep his grades up and do all his chores.
Ben and his best friend, Noah, practice daily at the baseball park, determined to make the seventh-grade varsity team. One afternoon, Ben hits a ball deep into the woods, and Hero enters full tracking mode. Hero leads Ben to a tiny golden-brown puppy clutching the baseball in his teeth. The puppy is malnourished, with bite marks and scratches consistent with dogs found around town, likely victims of a local dogfighting ring where small dogs are used as bait to provoke larger fighters. Though terrified of people, the puppy bonds instantly with Hero, who licks and cleans him and refuses to leave without him. Ben names the puppy Scout.
At home, Ben's father confirms Scout's wounds match the dogfighting ring victims. His parents decide Scout must go to the shelter, but Hero blocks the door, barking and positioning himself between Scout and Ben's dad. The parents relent and allow Scout to stay overnight. Ben's dad warns that dogs mistreated by people can be permanently changed.
Ben begins training Scout with Hero's help. Hero demonstrates commands for Scout, who gradually imitates the older dog. However, Ben starts falling behind, staying up late reading training books, oversleeping, and missing a vocabulary quiz. At school, he encounters Jack Murphy, a new student who played varsity shortstop at his previous school, making him Ben's biggest competition. Jack's behavior is aggressive: During practice, he throws a fastball directly at Ben's head. Ben ducks, and Hero races around the fence, barking angrily at Jack. Jack taunts Ben with an offer to bet Hero on another at-bat. Ben refuses and walks away. When Ben interviews Jack for the school newspaper, Jack reveals that his parents are divorcing and he moved to Gulfport with only his mother. Ben notices a flicker of sadness and begins to feel sympathy.
Scout's separation anxiety causes destructive episodes when left alone without Hero. Meanwhile, Ben notices a black SUV with tinted windows and a dented bumper creeping past his house. At Noah's dad's used car lot, a tall, thin man with piercing blue eyes approaches, complimenting the dogs and saying Scout looks familiar. Scout erupts in panicked barking, and the man vanishes. Ben's dad grants permission to foster Scout but warns that the dogs cannot be Ben's top priority.
Ben visits Officer Perillo, a K-9 trainer at the police station, for advice on working with Scout. Hero runs the department's obstacle course flawlessly, but Scout freezes on a ramp, and Hero carries him down by the scruff. Perillo advises consistency, love, and assertive leadership. When a police siren blares, Scout bolts and disappears. Hero tracks Scout's scent for miles to a desolate area where the same black SUV sits in a driveway. The tall man from the car lot emerges and introduces himself as Mitch. His demeanor is cold, and he asks if Ben has considered fighting his dogs. Ben refuses and leaves quickly.
At tryouts, Ben earns the starting shortstop position, but Jack fires a fastball that strikes Ben's collarbone during a scrimmage. Hero charges onto the field, but Ben calls him off. Coach Lee sends Jack away. That Friday, Ben builds a backyard obstacle course for the dogs and becomes so absorbed that he forgets the surprise birthday party he promised to set up for Noah's mother. Noah is furious. Ben ties Hero to a tree and secures Scout in his crate before biking to apologize. He spots Jack standing on the sidewalk outside his house; Jack runs off.
Ben returns to find Scout's crate open and both dogs missing. His dad reveals the school called about chronic tardiness, grounds him, and says Scout has to go. Panicking, Ben lies, claiming the dogs are at Noah's house. After his parents go to bed, he sneaks out to search and recruits Noah, who agrees to help despite his anger. At the animal shelter, a worker recognizes Scout from a photo and reveals that someone came weeks earlier asking about the same puppy. Ben checks the sign-in notebook and finds Jack's name. Convinced Jack is involved, Ben confronts him. Jack explains he visited the shelter to donate toys belonging to his sick dog, Holly, an old golden retriever, and was walking past Ben's house because he is still learning the neighborhood. Ben, embarrassed, apologizes.
Sunday morning, Hero returns home wounded, with a swollen eye and a hurt paw. Scout is not with him. Ben sets out with Hero and meets up with Noah. Hero tracks Scout miles outside town to a dilapidated barn. Inside, men cheer around a fighting ring while dozens of scarred dogs sit in stacked cages. Ben and Noah split up to search. Ben finds Scout cowering in the last cage. Mitch catches him and reveals he has been trying to reclaim Scout all along. He threatens Ben and shoves him out.
Ben finds an unlocked back door and re-enters. He frees Scout, but Mitch appears with a knife. Scout bites Mitch's arm, and Hero, who disobeyed the stay command, tackles Mitch from behind. Two fighting dogs chase Ben, but Hero intercepts them. When Mitch and a henchman recover and advance, Noah releases Hero, who knocks both men down. The henchman pins Hero, and Ben strikes the man with a shovel, then carries Hero out while Noah carries Scout.
At the veterinary clinic, the vet reports Hero has a mild concussion and a sprained leg but will recover. Ben encounters Jack, who has just learned that Holly has been put down. Jack apologizes for his earlier behavior, and Ben apologizes in return. Scout licks the tears from Jack's cheeks.
The police raid the barn and rescue the dogs, but Mitch escapes. Tearfully, Ben confesses everything to his parents: Mitch's connection to Scout, the stalking, and the confrontation with a knife. His father calls the station and tells Ben they will find Mitch together. Ben's dad puts Hero's official K-9 vest on him and straps a smaller vest onto Scout. Hero tracks Mitch back to his house. Scout suddenly leaps from Ben's arms and bolts inside through a partially open door. Ben and Hero chase after him. Inside, Mitch confronts Ben and his dad, but Scout bites Mitch's wounded leg and Hero knocks him down. Officers burst in and arrest Mitch.
In the aftermath, Ben decides to give Scout to Jack, knowing the puppy deserves a home with full love and attention close enough that Hero can still visit. Ben also asks Coach Lee to give Jack another chance, and the coach agrees to consider Jack for first base. At the season's first game, Ben hits a double as starting shortstop, and Jack follows with a home run. Hero and Scout bark happily from the bleachers. Ben reflects that with Hero, Scout, Noah, and Jack on his team, they can do anything.