Only weeks after giving up on his lackluster presidential campaign in the face of national indifference, Gov. Scott Walker of Wisconsin is back to making mischief in his home state. Last Friday, Mr. Walker signed a bill to protect public officials like himself from an effective and well-established tool for rooting out political corruption.

The tool, known as the John Doe law, lets prosecutors conduct secret investigations into possible crimes by executing search warrants and compelling people to testify. It is essentially a grand jury proceeding, with a judge rather than jurors deciding whether there is enough evidence for an indictment.

Mr. Walker has been a target of two John Doe investigations in recent years. The first, which looked into misconduct by his aides or associates while he served as Milwaukee county executive, led to six convictions. The second involved allegations of illegally coordinated fund-raising between Mr. Walker’s campaign for governor and conservative political groups. In July, a deeply split Wisconsin Supreme Court — several of whose justices were backed by the same groups in their election campaigns — shut down the investigation, adopting an unprecedented reading of the state’s campaign-finance laws to find no problem with the activities in question. Mr. Walker was not charged in either case.

Under the new law, which passed on party-line votes in the Republican-controlled Legislature, neither of these investigations would be permitted. Bribery, official misconduct, campaign-finance violations and many other election law offenses — all are now exempt from a law that has served Wisconsin well, and without controversy, since the mid-19th century.