In 1327, Franciscan friar William of Baskerville and Adso of Melk, a Benedictine novice travelling under his protection, arrive at a Benedictine monastery in Northern Italy to attend a theological disputation. This abbey is being used as an embassy between Pope John XXII, and the Friars Minor, who are suspected of heresy.
The monastery is disturbed by the death of Adelmo of Otranto, an illuminator revered for his illustrations. Adelmo was skilled at comical artwork, especially concerning religious matters. William is tasked by the monastery's abbot, Abo of Fossanova to investigate the death, and he has a debate with one of the oldest monks in the abbey, Jorge of Burgos, about the theological meaning of laughter, which Jorge despises.
The next day, a Greek scholar and translator, Venantius of Salvamec, is found dead in a vat of pig's blood. Previously, William and Adso had been prohibited from the library by the book keeper Malachi of Hildesheim, so they penetrate the labyrinth, discovering that there must be a hidden room, entitled the finis Africae. Bencio of Uppsala, a rhetoric scholar, reveals to William that Malachi, and his assistant Berengar of Arundel, had a homosexual relationship, until Berengar seduced Adelmo, who committed suicide out of religious shame. The only other monks who knew about the indiscretions were Jorge and Venantius.
By the day after, Berengar has gone missing, which puts pressure onto William. William learns of how Salvatore of Montferrat, and Remigio of Varagine, two cellarer monks, had a history with the Dulcinian heretics. Meanwhile, Adso is seduced by a peasant girl, with whom he has his first sexual experience. After confessing to William, Adso is absolved, although he still feels guilty. Severinus of Sankt Wendel, the herbalist, tells William that Venantius's body had ink staines on the tongue and fingers, which suggests poison. William and Adso penetrate the library once more, discovering that Venantius had a book stolen from him, which they pursue.
On the fourth day, Berengar is found drowned in a bath, although he bears ink stains similar to that of Venatius. Bernard Gui, a member of the Inquisition arrives to search for the murderer via Papal deduction. Due to this arrival, Gui arrests the peasant girl Adso loved, as well as Salvatore, accusing them both of heresy.
Remigio is interrogated by Gui, who scares him into revealing his heretic past, as well as falsely confessing to the crimes of the Abbey. Severinus then is found dead in his room, to which Jorge responds by leading a sermon about the coming of the Antichrist.
Malachi returns to the early sermon that day near death, and his final words concern scorpions. Nicholas of Morimondo, the glazier, tells William that whoever is the librarian would then become the Abbot, and with new light, William goes to the library to search for evidence. The Abbot is distraught that William has not solved the crime, and that the Inquisition is undermining him, so he fires William. That night, William and Adso penetrate the library once more in search of the finis Africae.
William and Adso discover Jorge waiting for them in the forbidden room. He says that he has been masterminding the Abbey for years, and his last victim is the Abbot himself, whom has been lead into the library. The Abbot suffocates, and Jorge tells them that Venatius's hidden book was Aristotle's Second Poetics, which speaks of the virtues of laughter, something Jorge despises. Jorge poisoned the ink on the book, which is consumed when one turns the pages. Venantius was translating the book and died. Berengar found the body and disposed of it in pig's blood, fearing exposure, before reading the book himself and dying. Malachi was convinced by Jorge to retrieve the book, which was stashed with Severinus, so he kills Severinus and retrieves the book, before getting curious and dying as well.
All of the murders time out with the Seven Trumpets, which call for objects falling from the sky (Adelmo threw himself from a tower), pools of blood, poison from water, bashing of the stars (Severinus was killed with his head bashed in with a celestial orb), scorpions, locusts, and fire. Jorge consumes the book's poisoned pages and uses Adso's lantern to start a fire, which burns down the library. As the fire spreads to the rest of the abbey, William laments his failure. Confused and defeated, William and Adso escape the abbey. Years later, Adso, now aged, returns to the ruins of the abbey and collects books that were salvaged from the fire, creating a lesser library.