Greyfriars, Edinburgh, nineteenth century. Ewan is a boy who loves Bobby, a terrier belonging to the policeman John Gray. When Gray dies Ewan wants to take care of his dog, but Bobby won't leave his master's grave. Reverend Lee lets the dog live in the cemetery even though the industrialist Smithie and the director of the orphanage Johnson don't approve. The dog is sent away, but the story does not end here, because he has become a symbol for the local population in their day-to-day struggle for survival.