"Mr Duffield," interrupted the judge, "I am always loath to intervene when counsel is addressing the jury, but there is a limit you know. You are not entitled to tempt the jury to acquit the accused just because good may have resulted from the crime." -- Mr. Justice Pantin in According to the Evidence
There are probably other legal mysteries that spoof the court system but I have never encountered any of them. There is Rumpole of the Bailey, but I don't recall the humor in those stories being specifically related to the law. The humor there arises out of character relationships. And when a writer is part of the legal system himself, like Henry Cecil, the books tend to be rather serious. If any attack is made on the course of circumvented justice or loopholes in the law that they tend to be scathing and admonishing. Not so with Cecil's series of courtroom hijinks and legal satires. He slays the fearsome dragons of the law with a rapier wit not the sword of wrath.
What would happen if witnesses were canny enough about the law to make choices that they legally and rightfully can make and yet manage to obstruct the course of true justice? What would happen if a private enquiry agent like Ambrose Low were hired to prove an absolutely guilty man were innocent? These dilemmas and more are posed in the often witty story in According to the Evidence (1954), one of the many comic crime novels of Henry Cecil, a County Court judge in England for several decades.
The basic plot involves serial killer Gilbert Essex who is acquitted of one murder only to be released and kill again. Alec Moreland, an artist and former soldier, decides to take the law into his own hands and execute the unjustly freed Essex. Through a combination of chance and his own confession to Jill, his fiancee, Alec is arrested for the murder. Jill approaches Ambrose Low and pleads with him to help her man escape the gallows. It was a service to the community killing that acquitted murderer, she tells Low. Alec is sure to be found innocent. But in an ingenious twist to the story rather than discovering (or even manufacturing) evidence to prove Alec innocent Low engineers a series of events that will prove him even more guilty. And the literal minded Colonel Brain is Low's patsy. But the plan backfires spectacularly and hilariously.
With its combination of linguistic wizardry and dazzling Socratic method According to the Evidence is a comic achievement. This book (and I suspect several of the others by Henry Cecil) would make an exceptional TV program or movie. I did a quick search at imdb.com to see if any of his books were adapted and I see only one short story and one novel. But apparently Cecil made it to TV with two series. Whether or not they are based on characters in his books I can't say.