A dog finds the meaning of his own existence through the lives of the humans he meets.
A dog named Bailey has lived multiple lives with the intent to return to his original owner Ethan. As Bailey is about to pass on again, Ethan (who knows about Bailey’s reincarnations) asks him to look after his granddaughter Clarity June/CJ, whose mother Gloria is troubled and tries to cut off Ethan and his wife Hannah from CJ’s life.
Bailey finds CJ as a child in the form of a beagle named Molly. She stays with CJ into her teen years before a car accident separates them. Bailey finds CJ again as a Yorkshire terrier named Max, who comes into CJ’s life when she is a young adult trying to kickstart a music career. With Max’s help, she reunites with her childhood best friend Trent. After all they go through, Gloria comes back into CJ’s life after being neglectful for so long, but she is ready to start over.
CJ and Trent bring Max to visit Ethan and Hannah, and Ethan proves to CJ that Max is the same dog that’s been with both of them for their whole lives. CJ realizes that Max (and any dog he’s been before) has been protecting her and also brought CJ and Trent back together.
CJ’s music career takes off, and she also marries Trent and has a son with him. Ethan passes away, and later Max does too, but they reunite in Heaven in Bailey’s original form.
The film starts with the dog known as Bailey (voice of Josh Gad) living on a farm with his owner and practical lifelong companion, Ethan Montgomery (Dennis Quaid) and his wife Hannah (Marg Helgenberger). Bailey loves that he has gotten to be with Ethan in his current life as a St. Bernard, in which he gets to spend time with him doing chores and doing the trick where he jumps off Ethan’s back to catch a ball, though they both note that it’s not getting easier.
Ethan and Hannah are visited by Gloria (Betty Gilpin), who was dating their son Henry before he was killed in a car accident and left her alone to care for their infant daughter Clarity June/CJ (Emma Volk). Bailey likes CJ but Gloria hates dogs and is constantly bitter. She also appears to neglect CJ, as seen when she is on the phone and doesn’t see CJ walking to the stable where the Montgomerys’ horse Lioness is. Bailey rushes to protect CJ before Ethan comes in and scoops CJ up, chastising Gloria for not watching her. Ethan and Hannah later discuss Gloria’s situation, and moments later, Ethan feels a lump on Bailey’s stomach.
Ethan and Hannah try to help Gloria as she is looking for work, but she constantly interprets this as them condescending her. She also thinks they want the money left from Henry’s life insurance, but all they want is to ensure that CJ is taken care of. Angered, Gloria takes CJ and leaves the farm, cutting Ethan and Hannah off. Later, Ethan finds Bailey lying in the barn, knowing his time is coming to an end. A vet comes to euthanize Bailey, but not before Ethan has one final moment with him and asks that when he comes back, that he look after CJ. The vet injects Bailey, and his pain goes away.
Bailey runs through a grassy field and sees a vision of CJ. He is reborn as a girl beagle named Molly, who stays in a home for dogs. She is closest to another dog named Rocky. One day, a boy named Trent (Ian Chen) comes to adopt a dog, and he picks Rocky, which means Molly will be alone. However, she then spots a little girl and instantly recognizes her as a now 11-year-old CJ (now played by Abby Ryder Fortson). Molly runs out to her and pounces on CJ, who quickly takes a liking to her. The dog keeper, Hilda (Arlene Duncan), asks Trent if he would take two dogs since Molly and Rocky are inseparable, but his parents are firm that he can only pick one dog. CJ decides to take Molly and keep her a secret from her mom.
CJ brings Molly home, and she immediately starts to make a mess. She tries to hide Molly from Gloria, who is now trying her hand at being a singer but is also an alcoholic who continues to disregard her daughter and leaves her alone when she needs her. However, with Trent’s help, CJ manages to convince Hilda that Gloria said it was okay to adopt Molly. Eventually though, Gloria does find out about Molly but is guilted by CJ into letting her keep the dog.
Molly grows with CJ (now played by Kathryn Prescott), who is trying to become a singer/musician. She is still friends with Trent (now played by Henry Lau), who still has Rocky. While walking Molly, CJ meets a guy named Shane (Jake Manley), whom Molly immediately distrusts, but CJ takes an interest in him.
Ethan and Hannah go to Gloria’s house to try and pay CJ a visit, but she still holds animosity toward them and refuses to let them see her. Molly sees Ethan and tries to get his attention. After doing so, Ethan quickly figures that Molly is Bailey.
Shane invites CJ to a party which gets stopped by the cops quickly. CJ is left to get arrested while Molly is taken to a shelter and is later picked up by Trent. CJ is forced to do community service at a dog shelter where dogs are trained to detect cancer through smells, which Molly learns how to do.
Later, CJ gets angry with Shane for leaving her at the party, and he forcibly grabs her to get her to stay. She goes home to tell Gloria what happened, but she shows indifference and suggests it was CJ’s fault for provoking him. When CJ mentions leaving to New York with Henry’s insurance settlement money, Gloria reveals she spent all of it to take care of themselves. CJ furiously leaves with Molly. On the road, Shane follows her and ends up rear-ending her, causing CJ to swerve and crash their car while he flees from the scene like the coward that he is. CJ is okay, but Molly is severely injured and she soon dies in CJ’s arms.
Bailey/Molly is once again running through the field before he comes back as a mastiff that is owned by a convenience store owner named Joe (Conrad Coates). In this life, he is named Big Dog, and he is still making it his mission to protect CJ. She ends up walking into Joe’s store one afternoon, and he walks over to get her attention. It is clear that she is still hurting over Molly. Big Dog shakes CJ’s hand the way she taught Molly to do. CJ starts to drive away, and Big Dog runs after her, but he gives up and watches her leave before Joe goes back to reclaim him. Big Dog spends the rest of his life with Joe, but is still sad that he won’t be seeing CJ anytime soon.
After Big Dog passes on, Bailey comes back as a Yorkshire terrier named Max. He is at the park for an adoption fair, and he bites anyone that shows interest in him so that he can be saved for CJ. Sure enough, he sees her and escapes his pen to run after her. Max follows CJ into an elevator and is almost caught by his leash when the doors close, but CJ saves him. She brings him back to the fair and is told by the event coordinator that if Max doesn’t find a home soon, he will be put down the next day. CJ decides to take him back home where she lives with her boyfriend Barry (Kevin Claydon) and his dog Duke.
CJ now works as a dog walker while also trying to keep up with her music career. While taking Max out, they both discover that Trent lives in the same building with his girlfriend Liesl (Daniela Barbosa). Max is excited to see Trent, but soon figures out that Rocky is long gone. Max wants to get CJ and Trent together, so he manages to break her and Barry up by chewing on his shoes and making him step in his poo. Barry also turns out to be a jerk who doesn’t support CJ’s music career, so that’s enough to send her out. This also causes even Duke to turn on Barry. Trent allows CJ to crash with him and Liesl, but Liesl shows signs of jealousy and distrust toward CJ.
As the two friends catch up with one another, Max detects something wrong with Trent. He admits to CJ that he’s been feeling funny after a trip to London, and after going to the doctor, it is discovered that Trent has cancer. Liesl breaks up with him because she can’t bear the thought of having to take care of him, so CJ stays by his side. Eventually, after much chemo, Trent is cancer free. While spending time with CJ, he notes that she might have stage fright, which is why she hasn’t been ready to perform in front of an audience.
CJ is contacted by Gloria after not seeing her for years. She agrees to meet up for lunch, where Gloria tells her she has been sober for almost a year, and how sorry she is for not being the mom she should have been. She gives CJ a box of Henry’s things that his parents brought to her when Molly was alive, which contain letters that Henry wrote to Gloria while she was pregnant. This inspires her to get over her stage fright, write new music, and finally perform. After doing her song, everyone applauds her performance.
CJ and Trent later travel to visit Ethan and Hannah. The two embrace their granddaughter, and Ethan spots Max and once again knows it’s Bailey, calling him “Boss Dog” like he always did, and Max happily reacts to it. Ethan tells CJ how Max is the same dog he’s had since he was a child and demonstrates this by having Max do the ball-catching trick off Ethan’s back. This makes CJ think about all the coincidental things with Big Dog and Max, like how he knew how to shake like Molly or detect Trent’s cancer. She runs to Trent and says she thinks that Max (and every dog he was before) always found her to bring them together. They admit their love for each other and share their first kiss.
Years pass, and CJ’s music career takes off. She and Trent get married and have a son, and she lets Gloria, plus Ethan and Hannah, be part of his life. Soon, Ethan passes away from old age with Max by his side for the last time. Not long after, it is Max’s time to go, and CJ and Trent stay with him in his final moments, letting him know what a great dog he always was.
The film ends with Bailey running through the grassy field again where Ethan is waiting for him, and now they can be together forever.