Moscow, 1924. While foraging for trash one winter day, a stray dog is found by a cook and scalded with boiling water. Lying forlorn in a doorway, the dog awaits his end awash in self-pity. To his surprise, a successful surgeon, Filipp Filippovich Preobrazhensky (whose name is derived from 'transformation' or 'transfiguration'), arrives and offers the dog a piece of sausage. Overjoyed, the dog follows Filip back to his flat, where he's given the name of Sharik. The dog finds it ironic, as he sees 'Sharik' fit for a pampered fat dog (it means 'little ball').
At the house, Sharik gets to know Dr. Preobrazhensky's household, which includes Doctor Ivan Arnoldovich Bormenthal (the professor's student and protegé) and two female servants: Zinaida Prokofievna Bunina and Darya Petrovna Ivanova. Despite the Professor's vocal anti-communism, his frequent medical treatment of the RCP(b) leadership makes him untouchable. As a result, he refuses to decrease his seven-room flat and treats the Bolsheviks on the housing committee, led by Schwonder, with unveiled contempt. Impressed by his new master, Sharik slips easily into the role of "a gentleman's dog".
After several days, one of the servants begins taking Sharik for walks through Moscow. Preening in his new collar, Sharik is unmoved by the taunts of a passing stray. After his health improves, the Professor at last reveals his real intentions for taking in Sharik. As Filip's laboratory is prepared, he locks Sharik in the bathroom.
As a seething Sharik plots to again destroy Filip's stuffed owl, the door opens and he is dragged by the skin of his neck into the lab. There, he is sedated and an operation begins. As Bormenthal assists, the Professor trepans Sharik's skull and gives him a human pituitary gland. Sharik's torso is also opened and he is given human testicles. These organs were cut from Klim Grigorievich Chugunkin – killed in a brawl – thief-recidivist, an alcoholic and a bully. Only repeated injections of adrenaline prevent the dog from dying on the operating table.
It's after this point that the story shifts from being told from the perspective of Sharik to being told from the perspective of Bormenthal, via his notes on the case, and then finally to a third person perspective.
During the weeks after the operation, the household is stunned as Sharik begins transforming into an incredibly unkempt and, at first, primitive human. After building an alliance with Schwonder, the former canine is granted papers under the absurd name "Poligraf Poligrafovich Sharikov". Preobrazhensky wanted to pick a name from his Orthodox Christian calendar and Sharik instead picked the publisher name – "Poligraf" (which in Russian is the root of several words related to printing art and technology).
In the aftermath, the Professor and Bormenthal patiently attempt to teach Sharikov basic etiquette. Instead, Sharikov mocks manners as a relic of Tsarism. He insists that it's better to behave "naturally". As a result, Sharikov curses in front of women, refuses to shave, dresses in unwashed clothing, and eats like a complete slob.
Meanwhile, Sharikov progressively turns the Professor's life into a living hell. One day, he accidentally turns on the spigot while chasing a cat. With the bathroom door locked and Sharikov unable to unlock it, the entire apartment is flooded. Later, he is caught attempting to sexually assault one of the female servants. Enraged, Bormenthal repeatedly hits Sharikov and forces him to apologize. Infuriated, Sharikov leaves the apartment and remains gone for several days.
Later, Bormenthal begs the Professor for permission to dose and kill Sharikov with arsenic, calling him a "man with the heart of a dog". The Professor is horrified and orders Bormenthal not to "slander the dog". He explains that the human body parts, which came from a homeless drunkard with Bolshevik sympathies, are responsible for all of Sharikov's defects. Bormenthal then suggests that they redo the operation, using the body of a genius. Again the Professor refuses, explaining that the operation was meant to improve the Human race. Breaking with his former beliefs, the Professor admits that any peasant woman could give birth to a genius and that eugenics are therefore a waste of time. In conclusion, the Professor refuses to permit Sharikov's murder or to undo the operation, which could easily kill him as well.
Soon after, Sharikov returns, explaining that he has been granted a job by the Soviet State. He now spends his work-day catching and strangling stray cats. The Party, he says, is turning them into cheap fur coats for the working class. Soon after, Sharikov brings home a female co-worker, whom he introduces to the Professor as his common law wife.
Instead of giving them their own room as Sharikov demands, the Professor takes the woman aside and explains that Sharikov is the product of a lab experiment gone horribly wrong. The woman has been told that Sharikov was maimed fighting Admiral Alexander Kolchak's White Army in Siberia. Upon learning the truth, she leaves the apartment in tears. Seething with hatred, Sharikov vows to have her fired. Again Bormenthal beats up Sharikov and makes him promise not to do anything of the sort.
The following day, a senior Party official, patient and good friend of Professor Preobrazhensky, Pyotr Alexandrovich, arrives and informs the Professor that Sharikov has denounced him to the secret police or CHEKA. Explaining that nothing is going to happen to him due to the State's distrust of Sharikov, the Party official departs. When Sharikov returns, the Professor and Bormenthal order him to leave the flat permanently. Instead, Sharikov refuses and draws a revolver. Enraged, the Professor and Bormenthal pounce upon him.
That night, an ominous silence reigns in the flat and the lights are left on for many hours after bedtime. Over the days that follow, the Professor and Bormenthal look far more relaxed than at any time before Sharikov's arrival. Eventually, the police arrive escorted by a beaming Schwonder.
Bearing a search warrant, they demand that the Professor and Bormenthal produce Sharikov on pain of immediate arrest. Unintimidated, the Professor orders Bormenthal to summon Sharikov, who is changing back into a dog. The Professor explains the change as a natural phenomenon, although it's obvious to the reader that he and Bormenthal have simply reversed the operation. Followed by the now apoplectic Schwonder, the police depart.
In the aftermath, the fully canine Sharik blissfully resumes his status as a gentleman's dog. However, in the ending of the book, he describes the Professor bringing home a human brain and removing the pituitary gland. This perhaps shows that Sharik retains some memories of his time as a human, or that Filip intends to carry out a similar experiment.