Set in the Dutch Republic during the political upheavals of 1672, the novel opens with a mob descending on the Buitenhof prison in the Hague. The crowd is enraged against Cornelius de Witt, the Ruaart of Putten (inspector of the region's dykes), who has been falsely accused of plotting to assassinate William of Orange, the young Prince newly restored as Stadhouder, the hereditary head of state and military commander. Under torture, Cornelius quoted Horace rather than confess; the judges sentenced him only to exile, but the Orangeist mob, supporters of William and his restored authority, considers the punishment too mild.
Johan de Witt, Cornelius's brother and the former Grand Pensionary (the highest elected official of the province of Holland), slips into the prison to fetch his brother. He meets the jailer Gryphus and Gryphus's daughter Rosa, a young Frisian woman who warns him of the danger. In the cell, Johan urges Cornelius to have his godson, Cornelius van Baerle, burn a packet of secret correspondence between Johan and the French Marquis de Louvois. Despite his broken hands, Cornelius writes a letter ordering van Baerle to destroy the papers unread, and Johan's servant Craeke departs on horseback with the letter.
Meanwhile, a pale young man observes the crowd with his officer, Colonel van Deken. Deputies at the town hall withdraw the cavalry guarding the prison. The brothers' carriage finds the city gate locked, its key taken by that same young man. The mob overtakes them, and both brothers are killed. The young man is revealed to be William of Orange, who returns the key and rides away with cold satisfaction.
Craeke delivers the letter to Cornelius van Baerle, a wealthy, apolitical twenty-eight-year-old tulip grower in Dordrecht and godson of Cornelius de Witt. The Haarlem Horticultural Society has offered one hundred thousand florins for a perfectly black tulip, a feat considered impossible, and van Baerle has just separated three offsets (small bulb-like growths) from a bulb he believes will produce such a flower. His next-door neighbor, Isaac Boxtel, a fellow tulip grower consumed by envy, has been spying on van Baerle through a telescope and earlier witnessed Cornelius de Witt entrusting his godson with the sealed packet.
Van Baerle does not read Craeke's letter. Moments later, soldiers arrest him for possessing seditious papers, found in the exact drawer described in an anonymous denunciation written by Boxtel. Van Baerle hides the three offsets on his person and is taken to the Hague. That night, Boxtel searches van Baerle's house for the offsets but discovers they are gone, and he resolves to follow the prisoner.
Van Baerle is locked in the Buitenhof prison, in the very cell his godfather vacated. Rosa watches from her doorway as he passes. The next morning, he sees the gibbet bearing the de Witt brothers' remains and hides his offsets behind a stone in his cell. That evening, Gryphus breaks his arm in a fall; Cornelius, a trained doctor, sets the fracture. Rosa urges him to escape, but he refuses, unwilling to incriminate her. At his trial, Cornelius admits holding the papers but claims ignorance of their contents. The judges sentence him to death.
Rosa listens in anguish as Cornelius learns the execution is scheduled for noon. He calls her to him and bequeaths his three offsets, writing a will in Cornelius de Witt's Bible and wrapping them in a page from the Bible, the very page on which Cornelius de Witt wrote the letter ordering van Baerle to burn the correspondence.
At the scaffold, the executioner raises his sword three times but does not strike: A pardon from William of Orange commutes the sentence to life imprisonment at the fortress of Loevestein, near Dordrecht. Boxtel, who bribed the executioner to obtain the prisoner's clothes and the offsets they presumably contained, is furious. He follows Cornelius to Loevestein under the alias Jacob Gisels, befriending Gryphus while searching for the offsets.
Rosa, who has been thinking constantly of Cornelius, petitions the Stadhouder to transfer her father to Loevestein as jailer. William grants the request, and Rosa arrives with the three offsets. Cornelius devises a plan: Rosa will plant one offset under his instructions, he will grow a second in his cell, and the third will be kept in reserve. Because Rosa cannot read or write, he teaches her using Cornelius de Witt's Bible, and their nightly sessions at the grating of his cell door blend horticultural instruction with deepening love.
Gryphus discovers Cornelius's hidden bulb and crushes it under his boot. Rosa whispers consolation: They still have two offsets. When Rosa tells Cornelius about "Mijnheer Jacob," a man lurking around the fortress, Cornelius suspects Jacob wants the tulip. Rosa tests this by pretending to plant an offset; Jacob digs through the soil searching for it, confirming the suspicion. Rosa plants the remaining offset in a pot in her room.
A brief quarrel separates them when Rosa feels Cornelius loves flowers more than her. He stops eating and nearly wastes away until they reconcile, and he confesses that her absence, not the tulip, is making him ill. Over the following weeks, Rosa reports the tulip's progress. One night she rushes to Cornelius: The tulip has opened, perfectly black and without a single blemish.
Rosa writes to the President of the Haarlem Horticultural Society and leaves to send the letter. When she returns minutes later, the tulip is gone. Boxtel, who forged a key to her door, has stolen it and raced to Haarlem, where he presents himself as the discoverer of the black tulip. Gryphus discovers Rosa has been visiting Cornelius and furiously separates them.
Rosa resolves to recover the tulip. She rides to Haarlem and seeks out President van Systens. William of Orange, who has arrived in the city, agrees to hear her case. Boxtel is brought in and denies knowing Rosa. She challenges him: How many offsets did the bulb produce? Boxtel guesses three. She asks where the third is; he lies. Rosa reveals the truth: The first was crushed by her father, the second produced the tulip, and the third she pulls from her breast. She then hands the Prince the paper that had wrapped the offsets, the page from Cornelius de Witt's Bible urging van Baerle to burn the correspondence without reading it. William reads it and is visibly shaken: The letter proves van Baerle never knew what the packet contained.
Back at Loevestein, Cornelius languishes. Gryphus attacks him with a knife, and Colonel van Deken, William's aide-de-camp, arrives with orders to take Cornelius away. Cornelius is driven to Haarlem, arriving the morning of the Festival of the Tulip. Boxtel marches in the grand procession alongside the black tulip. When Cornelius's carriage passes, William orders the prisoner released to view the flower. Instead of calling Boxtel forward to claim the prize, William's officer leads Rosa before the throne. William declares the flower will be named
Tulipa nigra Rosa Barlænsis, after van Baerle, which will become Rosa's married name, and places her hand in Cornelius's. Boxtel collapses and dies.
William presents the Bible page as proof of van Baerle's innocence. Cornelius is declared free, his property restored. William gives Rosa one hundred thousand florins as a personal gift, and the Haarlem prize goes to Cornelius. The couple return to Dordrecht, marry, and live happily. Over their door, Cornelius inscribes a line the scholar Hugo Grotius carved on the wall of his own cell at Loevestein: "Sometimes, one has suffered enough to have the right never to say: I am too happy."