The plot of the book, Ink Black Heart, written by JK Rowling (Robert Galbraith is her pen name):
After Strike and Robin visit The Ritz for Robin’s 30th birthday, Strike attempts to kiss Robin; she evades the kiss. Feeling rebuffed, Strike starts a relationship with Madeline, an acquaintance of his ex-fiancée Charlotte, a relationship he keeps secret from Robin.
Edie Ledwell, an animator who co-created the successful cartoon The Ink Black Heart on YouTube and which is now being adapted into a film on Netflix, visits the agency. She asks Robin to investigate the identity of Anomie, who co-created Drek’s Game, an online game based on the cartoon, and who started harassing Edie on social media after she criticised the game. Robin refers Edie to another agency with more cybercrime experience. Within the game, two moderators appear to have a dossier of proof that Anomie and Edie are the same person. They share this with Josh Blay, the other co-creator of The Ink Black Heart and Edie’s ex-boyfriend. Soon afterwards, Edie and Josh are tasered and stabbed while meeting in Highgate Cemetery, the cartoon’s setting. Edie dies while Josh is paralysed.
The agency is hired to investigate Anomie’s identity by a film producer seeking to adapt The Ink Black Heart. They investigate various individuals associated with the cartoon and the North Grove Art Collective. Much of the investigation takes place online with the detectives investigating Anomie’s abuse and another figure, The Pen of Justice, who criticised the cartoon for being racist, ableist and transphobic. They also investigate Drek’s Game, where Anomie openly confesses to the murder, something treated as a joke by the other moderators, including its co-creator Morehouse. Two moderators appear to be associated with the Halvening, the far-right group that compiled the dossier with fake proof and the police suspect committed the murder. Robin accesses the game and becomes an active player. Robin and Strike attempt to eliminate suspects by carrying out surveillance and examining who is otherwise engaged while Anomie is active in the game. They also receive phone calls telling them to exhume Edie’s grave and open letters buried with her. In the game, Paperwhite, another moderator, and Morehouse appear to have a relationship, with Paperwhite sending a racy picture to Morehouse and including Anomie by accident.
After leaving Comic Con, where she interviewed Yasmin, the former employee of Edie and Josh, Robin joins Strike to follow a suspicious individual to a station. A man dressed as Batman pushes the target onto the tracks as a train approaches. Robin helps save his life and her photograph appears in the newspapers. It is revealed that she saved Oliver Peach, the moderator Vilepechora in Drek’s Game and member of the Halvening. In the game, Anomie confesses this crime to Oliver’s brother, LordDrek, before banning him from the game. Soon afterwards, a parcel bomb damages the office, although nobody is injured. The publicity causes Morehouse to discuss going to the agency with Paperwhite. Robin is able to speak to the moderator Fiendy1 on a personal level and discovers she is Edie’s cousin. She is able to provide the identity of Morehouse and Strike and Robin decide to interview him, but Morehouse is murdered before they reach him.
Strike interviews Yasmin himself and discovers that she was being blackmailed by Anomie to login as them on several occasions, rendering much of their work to eliminate suspects moot. Robin also receives the picture that was supposedly sent by Paperwhite to Anomie and is able to trace the girl to a Glasgow art student. They then figure out Paperwhite was a sock puppet account controlled by Anomie to keep tabs on Morehouse and the other moderators. She then receives a phone call, threatening to kill her. Strike realises that Edie’s uncle did not bury Josh’s letter with Edie. After reading misogynistic abuse in the letter, they deduce someone with access to Katya, Josh’s agent, replaced the original letter.
Soon afterwards, Katya’s daughter calls them, screaming for help. After driving to Katya’s house, Gus, Katya’s son, now revealed as Anomie, tasers Strike. Robin sets off a rape alarm before fleeing upstairs, where she sees Gus’s father’s corpse. A machete-wielding Gus pursues her until he is distracted by neighbours alerted by Robin’s alarm, allowing her to hit him in the back of the head.
In hospital afterwards, Strike tells Robin that her name has been added to the office door, which brings her to tears, and that he has broken up with Madeline. Robin, who believed he was still dating Madeline, reveals she is now dating the officer, Ryan Murphy. After she leaves, Strike reflects that he may have missed his chance to date Robin.