A Ghost in the Machine

A Ghost in the Machine
First edition (UK)
AuthorCaroline Graham
SeriesChief Inspector Barnaby
GenreDetective fiction
PublisherHeadline
Publication date
1 August 2004
Publication placeUnited Kingdom
Pages512
ISBN0755307720
Preceded byA Place of Safety 

A Ghost in the Machine is a crime novel written by English writer Caroline Graham and first published by Headline in 2004. The story follows Chief Inspector Tom Barnaby investigating the case of the death of an antique collector. It is the seventh and final volume in Graham's Chief Inspector Barnaby series and preceded by A Place of Safety.

Unlike the majority of Graham's previous Chief Inspector Barnaby novels, A Ghost in the Machine was not adapted for the television series Midsomer Murders. According to Graham, this was because Chief Inspector Barnaby and Sergeant Troy are absent through the first half of the novel.