Imelda, a young woman from Santa Cecilia, Mexico, marries a young man who later abandons them with their daughter Coco to pursue a music career. Imelda permanently banishes music from her family and establishes a shoemaking business when he never shows up again.
Years later, Miguel, Imelda's great-great-grandson, now resides with Coco, his parents, and his grandmother, a shoemaker, along with their family, including Miguel. He adopts a street pet dog and names it Dante. Miguel secretly admires the late musician Ernesto de la Cruz, the greatest musician ever. Despite his family's forbidding music, he learns to play the guitar by viewing Ernesto's old videos. Miguel accidentally knocks into the family offerings on the Day of the Dead, damaging a frame that holds a picture of Imelda and a little Coco.
His great-great-grandfather is seen carrying Ernesto's renowned guitar in a hidden portion of the picture that has been removed from the image. Miguel informs his family that he will become a musician since he thinks this shows Ernesto is his great-great-grandfather. His grandmother breaks the guitar and sternly says, "There is no music in this family.” Heartbroken, Miguel runs away from his family, abandoning them. Since he couldn’t borrow a guitar from anyone to play in a talent competition, Miguel breaks into Ernesto’s grave and takes his guitar.
Miguel strumming it makes himself invisible to all living things. He could see and communicate with the dead. Nevertheless, he can converse with his skeletal, holiday-arriving ancestors from the Land of the Dead. They take him back to the Land of the Dead, and Dante goes along with him to discover that Imelda is unable to come. A homeless skeleton named Héctor disguises himself as someone else but is still unable to pass the Land of the Dead and take part in the ceremony, as no one remembers him in the world.
Since Miguel unintentionally took her picture down from the offerings, Miguel also learns that his theft of Ernesto's guitar has cursed him; he will perish if he does not receive a family blessing to enter the Land of the Living before dawn. Miguel accepts Imelda's blessing on the condition that he give up music, but he chooses to ask Ernesto for his blessing instead, and he comes back. A homeless skeleton named Héctor approaches him and offers to help him find Ernesto in exchange for Miguel bringing his picture to the Land of the Living and placing it on an altar there. Héctor will soon vanish as one of the forgotten if he doesn't get to see his daughter.
Miguel learns that Héctor used to be a musician, but due to unfortunate food poisoning, he was dead. Miguel needs Héctor's assistance to enter a talent contest to obtain entrance to Ernesto's house the same evening. Miguel’s family traces him to their spirit creature, Alebrije. Héctor takes him to a place where the dead, who have no photos to remember or offerings, are placed. They go there to get a guitar to play at Ernesto’s party. Cheech hands over his guitar to Héctor and passes away, as he has no one left alive to pass down his stories. Then, to prove Miguel himself a musician, he participates in a competition and plays the music.
Miguel’s family traces him there. Héctor learns that Miguel escapes from his family rather than getting Ernesto's blessings for his musical dream; he quarrels with Miguel about going with his family. Héctor has only one night to take his photo to the other end, and if not, he ought to be forgotten. Miguel is not ready to do that. Miguel's family finds him and forces him to run away once more. Music is the only thing that makes him happy, and he doesn’t want that to be taken away by his family.
Miguel enters the mansion undetected, and Ernesto greets him as his descendant. When Héctor shows up, he begs Miguel once more to display his picture. There was a fight between Ernesto and Héctor, who used to perform together. Miguel discovers that Ernesto, who couldn't write songs alone, poisoned Héctor and took his guitar and melodies, passing them off as his own. Ernesto confiscates Héctor's photograph and has Miguel and Héctor thrown into a cenote hole to preserve his memory. Miguel learns that Héctor is Imelda's long-lost husband and Coco's father.
Miguel is saved by his family, who then tell him the truth about Héctor's passing. Imelda and Héctor make up, and the family breaks into Ernesto's performance to get Héctor's picture. When the audience learns of Ernesto's actions, Imelda's Alebrije Pepita attacks him, causing a huge bell to fall on him. Héctor's snapshot is misplaced in the commotion. Coco's recollection of Héctor fades as the dawn rises; Imelda and a fading Héctor immediately bless Miguel as he comes home.
Following Miguel's rendition of "Remember Me" on Héctor's guitar, Coco gets to recall the memory and joins in. To preserve both Héctor's memory and his existence in the Land of the Dead, she first discloses that she had saved the torn-off portion of the family photo with his face on it. She then recounts her family stories about her father. Music is once again permitted once Miguel's family makes amends with him.
After a year, Héctor's letters to Coco show that Ernesto had plagiarised his music, allowing Héctor to be properly honored in Ernesto's stead. Miguel introduces his new sister Socorro to the family offering, which now includes Héctor and a recently departed Coco. As Coco and the rest of their family pay a visit to the living, Héctor and Imelda rekindle their passion for the Land of the Dead. For his living and deceased relatives, Miguel performs music.