The first commandment of mystery fiction is:
I. The criminal must be someone mentioned in the early part of the story, but must not be anyone whose thoughts the reader has been allowed to follow.
In his 1939 commentary on his Decalogue, Fr. Knox said:
The mysterious stranger who turns up from nowhere in particular, from a ship as often as not, whose existence the reader had no means of suspecting from the outset, spoils the play altogether. The second half of the rule is more difficult to state precisely, especially in view of some remarkable performances by Mrs. Christie. It would be more exact to say that the author must not imply an attitude of mystification in the character who turns out to be the criminal.
The spirit of the first part is, I think, fairly obvious: the reader must have some chance of figuring out the solution and having some idea that the character who turns out to be the murderer exists is a necessary (though not, except in badly written mysteries, a sufficient) condition for that.
There is, however, an exception to this rule: where the specific identity of the murderer is of no great consequence. If the solution to the problem is some salient characteristic of the murderer, rather than his name, it is fair play to have not introduced his name before so long as the salient characteristic was introduced. For example, if the conclusion of the mystery is that it must have been a policeman who committed the crime, it’s not cheating to have not mentioned the particular policeman before. I should note that this regards the actual plunging of the dagger; it won’t work if the policeman acted alone. It does work, however, if the policeman was acting on behalf of a character we’ve already met.
So a possible reformulation of the rule is that at least one of the criminals must have been mentioned in the early part of the story. If the murderer acted alone, this becomes the rule which Fr. Knox set down. In the case of conspiracies, however, one can omit the pawns from appearing in the early part of the story. One cannot, however, omit them entirely. If the dagger was plunged into the victim by the man cleaning his chimney acting in the pay of his nephew, we do not need to meet the chimneysweep early on, but we do need to learn fairly early on that he had his chimney swept.
I should note that it is less tricky to pull this off if the Chimneysweep turns up dead halfway through the novel.
With regard to the other half of the rule, I think that Fr. Knox’s clarification—that the author must not imply an attitude of mystification in the character who turns out to be the criminal—is quite right. To do this would be to lie to the reader. There is a genre called the unreliable narrator genre, of course, but I’ve never heard of this being done well in mysteries.
(The problem is that nothing can compel the unreliable narrator to eventually reveal the truth. You could, however, have multiple narrators. Probably the best example would be the memoirs of the murderer, which contain lies that misdirect the reader, followed by a postscript explaining which parts were lies, written by the police detective after the murderer’s execution.)
Probably the book which Fr. Knox is referring to, by the way, is Agatha Christie’s The Murder of Roger Ackroyd. (There’s no point in spoiler warnings since the context inherently gives away the plot twist.) It is narrated by Dr. Sheppard, who assists Poirot in his investigations, and rather famously concludes with Poirot identifying Dr. Sheppard as the murderer. Christie makes it work by having the novel being written in real-time during the case; thus when Poirot reveals that Dr. Sheppard was the murderer the novel was almost entirely finished; he needed only some minutes to complete it where he admitted his guilt. And it should be noted that Sheppard was chronicling what Poirot did and said, he was not himself actively engaged in trying to solve the crime.
This does raise a curious point, though, that the attitude of mystification which is forbidden is in the murderer’s private thoughts—whether known through omniscent narration or first-person narration—not in the murderer’s actions. It is perfectly permissible for the murderer to have the external attitude of mystification. In fact, it is fine for the murderer to actively investigate the crime in order to throw suspicion off of himself.
I will say, though, that on the last part I tend to find that ruse disappointing. I prefer mysteries in which the good guys are actually good. I realize that in a sense this goes against the heart of the mystery novel—which is figuring out which apparently good person isn’t—but I prefer a mystery story in which there is some solid foundation in the rough waves of deception.
If you like murder mysteries, you might like murder mystery, The Dean Died Over Winter Break.