A puppy is born in the wild, along with three siblings. They live by a culvert under a tree and are taught to forage for food in trash cans. When the puppy is 3 months old, he and all but one in his family is captured.
The woman who finds them takes care of them, along with many, many other strays. She gives the puppy the name of Toby. Toby’s mother figures out how to open the gate and leaves. Then people from an animal shelter take away all the dogs because she has too many. They put Toby and a few other dogs in a back room and turn on gas. Toby falls asleep.
When Toby wakes up, he’s a golden retriever puppy in a kennel where dogs are bred. Toby has a new mother and many siblings. He wonders about his purpose and what he’s supposed to do.
Toby notices the gate and remembers how his mother opened one. He works the knob until it opens. Then he runs. A drunk finds him, goes to a bar and locks Toby in the truck’s cab. Toby almost passes out when the cab gets too hot. A woman breaks the window of the truck and rescues Toby. Then she takes him home and introduces him to her son named Ethan. Toby instantly loves Ethan, who gives him the name of Bailey.
Bailey is house trained and taught the rules. Ethan introduces Bailey to his friend Chelsea and others. Chelsea has a dog named Marshmallow that Bailey often plays with. Bailey decides that his whole purpose in life is to be with Ethan.
Ethan’s parents fight. At those times, Ethan comes to the doghouse, and they lie there together. Bailey thinks comforting Ethan might be his purpose.
Three children, Todd, Drake and Linda, move to the neighborhood. Todd and Ethan become friends, but Todd is a different kind of person. He likes to blow up things with firecrackers and burn things with fire. Todd tries to glue a firecracker to Bailey’s back, but Linda saves Bailey.
Ethan, Mom and Bailey go to live with Ethan’s grandparents on their farm for the summer. Bailey loves the freedom and time with Ethan. They go fishing on a boat, but one day, Ethan falls into the water. Bailey goes in after him and pulls him to the surface. Ethan was just going after his fishing pole and can swim, but he loves how Bailey is trying to save him.
They return to the neighborhood at the end of the summer, and Ethan starts school again, which Bailey finds unbearable. But summer comes again, and they go back to the farm. A farm girl named Hannah brings baked goods to Ethan’s grandparents from her mother. Ethan and Hannah meet.
Ethan stays at his grandparents’ farm overnight by himself. He takes a horse ride with Bailey running alongside. A snake causes the horse to throw Ethan, and the horse runs away. Ethan and Bailey wander for days in the wilderness until Bailey leads Ethan to people who have been searching for him.
They return to their neighborhood, where soon after, Marshmallow turns up missing. Bailey smells her scent on Todd, but no one ever finds her. At Christmas, Chelsea gets a new puppy and names her Duchess. Bailey grows annoyed that Duchess never stops wanting to play. But they become friends.
When Ethan gets in a go-kart race with neighborhood kids, Bailey jumps on his car at the end, which pushes him to the finish line. This angers Todd, and the two get in a fight. Ethan wins. Later that evening, Todd throws a rock through Ethan’s living room window.
When Ethan enters high school, things change for Bailey. Ethan plays football and has less time for him. The family no longer goes to visit his grandparents during the summers, and Ethan starts to work cutting people’s lawns. When Ethan starts driving, Bailey gets to sit in the front seat with him.
Finally, one summer they return to the farm, and Ethan helps his grandfather construct a new barn. Hannah visits. The two start dating. When the Ethan and his mom return home, Dad now has his own bedroom, and Ethan talks to Hannah on the phone a lot.
Bailey finds a way to escape the backyard after a heavy snow. While he is gone, Todd sets Ethan’s house and Christmas tree on fire. When Bailey returns, he attacks Todd so Todd’s shoe is left at the scene of the crime. Mom and Dad escape the flames, but Bailey can’t get to Ethan. Finally Ethan has to jump through his upstairs window to get out. He ends up with a leg wound. Todd is arrested.
Mom, Ethan and Bailey visit the farm, and it’s decided that Ethan and Bailey will stay there to finish the school year. At the end of the summer, Ethan packs to leave for college. Bailey lives at the farm with Ethan’s grandparents, and Ethan comes home for visits from college and works there in the summer. Eventually, Mom moves in also. She and Dad have broken up. Ethan, who still walks with a cane from his fire-related injury, and Hannah break up, too.
Grandpa brings a young donkey to the farm. His name is Jasper. Bailey plays some with him, but Bailey starts getting tired and can’t play as much or as long. Bailey’s tiredness increases, and eventually he can’t stand up. He is taken to the vet. He knows he’s dying. Ethan arrives before Bailey dies, and Bailey enjoys him one last time.
Bailey wakes up and is a puppy again. But he has such an ache for Ethan that he whimpers a lot. He realizes he’s a girl dog now, a German shepherd.
A man named Jakob adopts and trains her. He calls her Elleya, Ellie for short. Jakob is a policeman. He isn’t a master like Ethan, but he’s kind and patient. He trains Ellie to obey and to find people. Ellie senses that Jakob has a deep pain. Jakob has recently lost his wife.
After a year, Jakob starts taking Ellie to work with him. Ellie is asked to find an Alzheimer’s patient who has wandered off. That’s when Ellie understands that her purpose is to find and save people. Sometimes, Jakob and Ellie are flown places. Ellie finds a girl who has wandered off by the ocean. Then they work to find a girl who has been abducted.
They find the girl, but Jakob is shot by the perpetrator. He is taken away. Ellie lives in the police kennel for a time. Then Maya becomes her new master. Maya has three cats: Stella, Tinkerbell and Emmet. She has a large extended family, and a man named Al who likes her.
Maya and Ellie find wandering children, a dead man in the woods and a woman who has fallen off a horse. They travel to El Salvador in a chopper and help find earthquake victims in the rubble. Most of the people they find are dead, but Ellie forces Maya to follow her into rubble to find one woman who is still alive. But in the process, acid gets on Ellie’s nose.
Once Ellie’s nose is healed, she can’t seem to find any scents. She is decertified. Shortly after, Maya and Al marry, and Ellie gets to carry the rings up the aisle. Eventually Maya and Ellie start going to schools to talk about the canine unit.
At one school, a small girl named Alyssa is allowed to pet Ellie all by herself. Her parents come to the school. Jakob is her father. Ellie is glad to see him again.
During another school visit, a violent rainstorm comes upon them. A student goes missing. Ellie finds him in the sewer and rescues him with the help of the police department.
Maya and Al have a baby and name her Gabriella. Slowly, Ellie’s senses grow dim. She knows her time with Maya is coming to an end. Ellie concludes that all she has learned in each of her lives has allowed her to rescue people, especially the child caught in the sewer. Ellie feels that this time, her life will come to an end and she won’t be reborn. She is ready to die and welcomes her final visit to the vet.
Ellie wakes up as a new puppy Labrador, a boy, and can’t believe he’s a puppy again. This time, he has eight siblings — all with black hair. Ellie can’t understand what else he has to do and why he’s been reborn as another puppy. He isn’t very active because he can’t stand the idea of relearning everything. People slowly buy each sibling in the litter. These dogs have papers and pedigree. The owner has to lower Ellie’s price to sell him to a man named Derek for his girlfriend, Wendi. Wendi names him Bear.
Eventually Wendi receives an eviction notice because she has a dog. So she takes Bear to her mother’s house. Her mother lives with Victor, who is abusive. After they are reported for how they are treating Bear, Victor puts Bear in the trunk of his car and abandons him in the wilderness. Bear feels purposeless.
Bear walks aimlessly until he figures out where he is. He is in the area where Ethan had gotten lost many years earlier. He follows the river and then the road to reach a town. He eventually ends up in a dog park. There, he smells Hannah’s scent on one of the dogs, Carly, and its owner.
Now Bear feels he has purpose. He wants to find Ethan. Each day he goes to the dog park and plays with Carly. But people start to question why he’s there and where his owner is. When Bear sees someone from the dog pound, he runs into the woods. Eventually he reaches a place he recognizes as the veterinary hospital where he died when he was Bailey.
In the parking lot, Bear picks up the scent of Jasper, Grandpa’s donkey. He follows it and finally reaches the farm. At the farm, he sees an older man inside the house. The smell of Ethan is everywhere. Bear gets the man to open the door, and Bear realizes the old man is Ethan.
Bear hangs around Ethan, who is in his 60s, until Ethan calls the dogcatcher. Bear has to stay in the dog pound for a few days, but eventually Ethan comes to get him. Ethan renames the dog Buddy. He gives him Bailey’s collar, and Buddy takes in the scent of who he was when he was Bailey.
Ethan has never married. He lives by himself at the farm. Buddy senses that Ethan has the same kind of sorrow that Jakob had. Buddy realizes that he can’t just find Ethan, who is hurting, but must also save him.
Buddy goes to the dog park and finds Carly. Then he walks home with Carly and her owner. When they go inside, Buddy waits on the steps. Before long, Hannah, who is an older woman with white hair, comes to the house. She has been a widow for 15 years. She calls Ethan to tell him she has his dog.
Ethan picks up Buddy. He and Hannah talk, and he invites her over for dinner. For about a year, they see each other often. Then Buddy is happy to carry the rings down the aisle for them.
The sadness in Ethan leaves, and the house is filled with Hannah’s three girls and their families during the holidays and for visits. Buddy sees that he needed all of his experiences in all of his lives to save Ethan from despair. Buddy is glad to be there for his boy.
Days go by and Ethan and Hannah are happy. One day when Hannah has to leave for an errand, Buddy knows something is wrong with Ethan before Ethan does. Buddy is with Ethan when he dies. Buddy feels at peace. He realizes that being there for Ethan has given him purpose.