Miguel Rivera is a young boy living in Mexico who dreams of being a musician, but his family forbids music being played because his great-great grandfather left the family to pursue his own dream of being a musician.
Miguel believes his idol, the beloved musician Ernesto De La Cruz, was his great-great grandfather, and he is transported to the Land of the Dead when he tries to steal Ernesto's guitar from his tomb. Miguel meets his ancestors, plus a trickster named Hector who wants Miguel to bring a photo of him back to the living world so that he may be remembered on the Day of the Dead.
After they find Ernesto, it turns out he was a fraud who killed Hector (his best friend) and stole the music that Hector wrote, which made him popular. It is also revealed that Hector is Miguel's real great-great grandfather, as his daughter Coco (Miguel's great grandmother) was the only reason he wanted to cross back to the living world.
Miguel and his family expose Ernesto to the rest of the deceased, and he gets trapped under a bell, just as he died in life. He is to be forgotten by the living world once exposed. Hector starts to fade away because Coco cannot remember him, but Miguel is sent back in time to play the song "Remember Me", which Hector had written just for Coco.
A year later, Coco has passed on and rejoined her parents. Hector is remembered by more people when Miguel provides the old letters and songs Hector wrote that Coco kept. Miguel also finally gets to play music for his family.