The defence of "responsible journalism" in libel cases can extend beyond newspapers to books following an unprecedented Court of Appeal ruling.
The court ruled Mr McLagan had conducted careful research
Three judges dismissed a claim for damages from ex-police officer Michael Charman against journalist Graeme McLagan and his publishers Orion.
Mr Charman claimed Mr McLagan's book Bent Coppers, about alleged police corruption, libelled him.
Mr McLagan said the ruling was a "victory for responsible journalism".
The Police Federation of England and Wales, which backed Mr Charman, now faces an estimated £1 million legal bill, with £400,000 to be paid in 28 days.
Last year, Mr Charman won his defamation case against Mr McLagan. He claimed the book libelled him by suggesting that there were "cogent grounds" of suspecting him of being involved in corruption.
But three appeal judges overturned that decision, saying Mr McLagan and Orion had acted responsibly in producing Bent Coppers: The Inside Story of Scotland Yard's Battle Against Police Corruption.
Former BBC correspondent Mr McLagan said: "This is a victory for solid, responsible investigative journalism.
"Exposing police corruption is obviously in the public interest as was recognised by the trial judge, the appeal court and even by Michael Charman's own defence team."
The court found that McLagan had taken steps to verify the story and as a result of his honesty, his expertise on the subject, his careful research, and his painstaking evaluation of a mass of material, the book was protected by the defence known as Reynolds qualified privilege.
This allows the media to publish information, even if it turned out to be untrue and defamatory, provided the public had the right to know it and it was the product of responsible journalism.
Lord Justice Ward, sitting with Lord Justice Sedley and Lord Justice Hooper, said he was "totally satisfied" the book was a piece of responsible journalism.
It is the first time that the Reynolds defence has succeeded in the publication of a book.
Caroline Kean, solicitor for Mr McLagan and Orion, said the ruling was "ground-breaking".
"It is not limited to newspapers, it means all media and there is no time constraint," she added.
Peter Roche, chief executive officer of the Orion Publishing Group, said: "This judgment will enable serious investigative works covering matters of public concern to be published in future and increase the freedom of debate in the UK."
The Police Federation was not available for comment.