Cogheart is set in a version of Victorian England where airships fill the skies and clockwork mechanicals serve as household servants and animal companions.
The story opens aboard the private airship
Dragonfly, where inventor John Hartman and his mechanical fox, Malkin, are under attack by a silver airship. As the enemy vessel harpoons and reels in
Dragonfly, John places Malkin in an escape pod with a battered envelope addressed to his daughter Lily and instructs the fox to find her at Brackenbridge, their country home. Two figures with silver eyes board
Dragonfly and strike John unconscious.
At Miss Scrimshaw's Finishing Academy for Young Ladies, 13-year-old Lily Hartman chafes against the school's rigid expectations. Her father sent her there under a false surname to hide her identity after her mother's death. When Madame Verdigris, her father's French housekeeper, delivers news that Papa's airship has crashed and he is presumed dead, they leave for Brackenbridge Manor. On the commuter zeppelin, a thin man carrying a skull-handled cane who introduces himself as Mr. Roach joins their cabin. Lily discovers his silver lenses are mirrors sewn into the sockets of his eyes. Before falling asleep, she hears Roach address Madame by her first name and make threatening remarks about Lily's future.
At Brackenbridge Manor, Madame has taken over Papa's bedroom and begun searching his office. Mrs. Rust, Papa's mechanical cook, warns Lily privately about Madame's behavior. Professor Silverfish, Lily's godfather and Papa's former business partner, arrives with a lawyer to read Papa's letter of wishes: Madame is appointed Lily's guardian, and the estate's debts exceed its assets. Silverfish wears a crude clockwork heart device on his chest, a sign of his failing health. Before leaving, he privately gives Lily his London address and urges her to contact him if she is in trouble.
Meanwhile, in the village, Robert Townsend, the 13-year-old son of local clockmaker Thaddeus Townsend, finds Malkin hiding in a shed after a man with silver mirrored eyes, Mr. Mould, shot the fox during the pursuit. Robert and Thaddeus repair the bullet wound and discover a singed envelope addressed to "Lily" in Malkin's pouch. Roach visits the shop and intimidates Robert, confirming the men are hunting the fox. That evening, Robert fixes a misalignment in Malkin's mechanism and winds him. Malkin awakens and delivers a message for Lily: "The secret's in the safe."
At the manor, Madame presses Lily about a "perpetual motion machine," a theoretical device that runs forever on its own momentum. After a vivid dream of her mother saying, "The secret's at the heart of it," Lily finds a safe behind her mother's portrait in Papa's study. Inside is a rosewood box with a heart-shaped golden keyhole she cannot open without a key. She hides the box under a loose floorboard. That night, Madame has men carry the unwound bodies of the household mechanicals away.
Robert arrives with Malkin's message, and Lily escapes her locked room by climbing out the window. Together they retrieve the rosewood box and flee the manor when Roach and Mould arrive. At Thaddeus's shop, Lily reads Papa's bullet-damaged letter aloud. The surviving fragments reveal that people killed her mother and injured Lily deliberately, and that the perpetual motion machine is at the center of the danger. Thaddeus proposes they travel to London to consult Professor Silverfish.
That night, Roach and Mould break into the shop. Thaddeus stays behind to hold them off while Robert, Lily, and Malkin flee. The men set fire to the building, and Thaddeus is mortally wounded. Robert watches neighbors pull his father's body from the burning shop. The three escape across the countryside and shelter in a derelict watermill, where Robert absolves Lily of blame and they begin to trust each other.
At
Dragonfly's crash site, they recover a flight recorder and meet Anna Quinn, an aeronaut and journalist investigating the crash. Aboard Anna's small airship,
Ladybird, they play the recording, which captures Roach and Mould torturing Papa and demanding the perpetual motion machine's location. Robert argues that surrendering the box would mean everyone who died protecting it died for nothing. Anna offers to fly them to London. During the overnight flight,
Behemoth, the silver airship belonging to their pursuers, attacks. Through desperate teamwork, Lily and Robert keep
Ladybird airborne and outrun
Behemoth.
At Professor Silverfish's Chelsea house, which Lily realizes was her childhood home, the professor listens to their story and reveals the history of the Cogheart. When his own heart began failing, John built a clockwork replacement that proved to be a perpetual motion machine capable of keeping a human alive forever. John refused to hand it over, believing such a device should not exist. Silverfish opens the rosewood box with a key he says John entrusted to him, but it contains only Lily's mother's personal effects. His warmth vanishes. He rings a bell, and Roach and Mould enter, dragging Papa between them, alive but battered. Silverfish has orchestrated everything and threatens to harm Lily unless Papa reveals the Cogheart's location.
Roach locks Lily and Robert in a coal shed, but Malkin frees them. They re-enter the house, find Papa's kidnapped mechanicals imprisoned and tortured for information, and wind them back to life. Together the group frees Papa from the basement. The mechanicals hold off Roach's armed men while Lily, Robert, and Papa escape through a secret passage John once installed in the house.
The tunnel exits near
Behemoth's mooring. Silverfish ambushes them in the cargo bay and points a gun at Robert. Lily dives in front of Robert as the gun fires. The bullet pierces her chest but strikes something metal inside her. Papa reveals that on the night of the accident seven years ago, when both her mother and Lily lay dying, he saved Lily by having surgeons implant the Cogheart into her chest. The device has been keeping her alive ever since. Silverfish orders Roach to throw Robert off the ship and takes off with Lily and Papa, intending to surgically remove the Cogheart.
Robert recovers as Malkin arrives with Anna in
Ladybird. With the mechanicals' help, they chase
Behemoth along the Thames. Robert rides a zip-line from
Ladybird to
Behemoth with Malkin in his jacket, overcoming his fear of heights. Inside the airship, Lily lies strapped to a table as Silverfish prepares to operate. She experiences a near-death vision in which her mother urges her to fight, and the Cogheart restarts. Roach draws a rapier from his cane; Robert provokes him into swinging, and the blade severs a steering cable.
Behemoth crashes into Big Ben's clock tower. The balloon catches fire, and Roach and Mould fall to their deaths.
Silverfish drags Lily into the tower. Robert, Malkin, and Papa follow onto a gantry above the enormous clockwork mechanisms. On a narrow beam that turns the clock's minute hand, Robert remembers his father's lessons about clocks and realizes the beam will rotate when the minute shifts. He braces himself and Lily. The mechanism clicks, the beam shifts, and Silverfish, weighed down by his heavy heart machine, falls into the giant gears.
In the aftermath, Anna's newspaper article identifies Silverfish as
Behemoth's owner without mentioning Lily, Robert, or John. While recovering in hospital, John offers Robert a permanent home at Brackenbridge, promising to teach him mechanics. Lily asks Papa why he saved her over her mother. He explains that he and her mother made a pact: If anything happened, they would save Lily first.
They fly home to Brackenbridge, where they find Madame Verdigris packing up the house. Lily confronts her and reveals Papa, Robert, and all the restored mechanicals behind her, expelling Madame from their lives. Weeks later, the household has settled into a new rhythm. Lily presses her hand to her chest and feels the Cogheart beating strongly, reflecting that its sound is "the music of living, the rhythm of life."