The story opens with a narrator revealing a secret: Cats are magic. Among their thousands of special abilities, the seventh and most important is cross-species two-way metamorphosis, the power to swap bodies with a human. The narrator warns that humans who experience this power discover its terrible and often deadly effects, and introduces Barney Willow as one such person.
Barney is a 12-year-old boy living with his mum, Mrs. Willow, a librarian, in the town of Blandford. His parents are divorced, and his father disappeared without explanation 211 days ago. His only friend is Rissa Fairweather, a confident girl who lives on a barge with her parents and is genuinely unbothered by teasing. At Blandford High, the principal, Miss Whipmire, singles Barney out and personally fails his homework, while his chief bully, Gavin Needle, torments him daily.
On Barney's 12th birthday, there is no card from his dad. At school, Gavin and his friends set off the fire alarm and Miss Whipmire blames Barney. In her office, she mocks his missing father, reveals she has been deliberately failing his grades, and hands him a letter warning that one more offense means expulsion. As Barney stares at a cat calendar, she whispers how wonderful it would be to live as a cat, free of human worries. Rather than upset his mum, Barney rips the letter up. Walking home, he encounters a black cat with a white patch around its left eye. Dreading a confrontation with his mum, he crouches behind a hedge, strokes the cat, and says, "I wish I was you." The street spins, colors grow vivid, and a flowerpot shatters. Then everything goes still.
That evening, thick black hairs sprout on Barney's arms. He falls into the deepest sleep of his life and wakes as a cat: His mind and memories are intact, but his body is covered in black fur with paws, a tail, and whiskers. His dog, Guster, a King Charles Spaniel, charges upstairs. Barney discovers that one of his cat abilities is understanding animal languages: Guster declares his intention to kill the intruder. Barney's mum rescues him but, unable to find her son, drops the cat outside.
A neighbor's cat named Mocha explains the three types of cats: firesides (domestic pets), swipers (dangerous street cats), and no-hopers (former humans trapped in cat bodies). A gang of swipers led by a fat ginger cat named Pumpkin surrounds Barney, claiming to act on orders, but scatters when Rissa arrives. To Barney's horror, a boy who looks exactly like him walks out of his house in his uniform, giving the real Barney a knowing look.
Barney sneaks into school but is carried to Miss Whipmire's office by a kind teacher. Behind a locked door, Miss Whipmire speaks cat and reveals the truth: She was once a Siamese cat named Caramel, owned by the real Polly Whipmire. Mistreated by humans, Caramel wished to become human, completing a body swap. The real Polly, trapped as a cat, was denied food and water and died; the pen cup on Miss Whipmire's desk is Polly's skull. She threatens Barney with the same fate and locks him in a filing cabinet.
Rissa hears Barney miaowing inside the cabinet and forces Miss Whipmire to open it. On the walk toward Rissa's barge, about 20 swipers attack on Miss Whipmire's orders, clawing Rissa until she drops Barney. He hides behind garden railings, where the swipers freeze at the sight of the Terrorcat, a one-eyed silver cat from Brewer Street. Barney sees his reflection in a puddle and confirms he inhabits the black cat's body.
Later, the Primm twins, Rissa's classmates, show her photos of a bearded man at a cattery who resembles Barney's missing father. Rissa visits and confronts the man, who denies being Neil Willow but tells her to keep her mind open to the impossible.
Barney goes to the library hoping to prove his identity to his mum, but the plan fails. His mum hands him to a woman who mistakes him for her family's cat, Maurice. At the woman's home, Barney realizes he is in Gavin Needle's household. The family dog reveals that Maurice is Miss Whipmire's son and that the body swap was deliberately arranged. Barney escapes and goes to Miss Whipmire's house but is ambushed by swipers. Miss Whipmire seizes him and drives to a bridge, explaining that killing Barney will ensure Maurice stays human permanently. Maurice calls begging her to stop, but she drops Barney into the freezing river.
Barney fights the current toward Rissa's barge. Rissa spots him through her telescope, and her father pulls him to safety. Before dawn, Barney arranges carrot cake crumbs into the words "I AM BARNEY," then slips out to find the Terrorcat.
The Terrorcat confesses his fearsome reputation is a bluff. He knows about Barney's dad because he is Barney's dad. Neil Willow wished to become a cat after losing his job and has been watching Barney from a window ever since. Neil tried to wish himself back but failed because he did not accept his human self enough. Self-acceptance, he explains, is the key to reversing the transformation.
Rissa finds the crumb message and sets out to help. Barney and his father follow Maurice, who is walking Guster, and hide in a park. They convince Guster of the truth by citing personal details only they would know. When Gavin corners Maurice on the street, Barney whispers information about Gavin's secret vulnerabilities, and Maurice uses it to stand up to the bully.
Rissa tells Mrs. Willow the cat is her son, but Mrs. Willow cannot believe it. Miss Whipmire arrives, snatches Barney, and demonstrates the Fatal Thumb Death Press, a pressure technique that can kill a cat instantly, holding her thumb against his neck. She reveals she identified Barney through the English teacher Mr. Waffler's list of imaginative students and had previously fought his father as a newly transformed cat, taking Neil's eye. She systematically made Barney miserable and planted the idea of wishing to be a cat.
Barney's dad, who has slipped inside, convinces Guster to help. The spaniel bites Miss Whipmire's leg while Rissa and Mrs. Willow grab her arms. Outside, Barney's dad bluffs the swipers as the Terrorcat. Miss Whipmire screams that being a cat "is to be nothing," which disgusts Pumpkin, who leads the swipers away. Maurice, hearing his mother's contempt for cats and grateful to Barney for helping him, decides he wants to be a cat again. As Maurice's wish aligns with Barney's fierce acceptance of his own imperfect life, the transformation reverses: Barney's body grows back, regaining fingers and freckles, while Maurice shrinks into a cat. The police arrive to find Miss Whipmire apparently strangling a naked 12-year-old boy.
Miss Whipmire is arrested, unable to become a cat again since the real Polly Whipmire is dead. Maurice goes to live with the Fairweathers on their barge. Barney's dad remains a cat but moves into the Willow household, getting along with Guster. Barney accepts that his parents are separated but is grateful his dad is alive and present. A kind new principal takes over, and Barney's grades improve. Rissa asks Barney to the cinema, telling him she just wants him to be himself. Barney looks in the mirror and, for the first time, feels content with the boy staring back, certain he would not wish to be anything else.