The Espionage Act of 1917 was  passed two months after the United States entered World War I. In his 1998 book Secrecy, the late senator Daniel Patrick Moynihan tells the story of how it came into being. Congress was responding to incidents of German espionage before the declaration of war. In July 1916, German agents blew up the Black Tom munitions dump in New York Harbor. The explosion was loud enough to be heard in Connecticut and Maryland. The Espionage Act was passed with bipartisan support in a Democratic Congress and strongly supported by President Woodrow Wilson, also a Democrat.

Wilson wanted even more. “Authority to exercise censorship over the press,” he wrote a senator, “is absolutely necessary.” He got that authority in May 1918 when Congress passed the Sedition Act, criminalizing, among other things, “abusive language” about the government.

Wilson’s Justice Department successfully prosecuted Eugene Debs, the Socialist candidate who received 900,000 votes for president in 1912, for making statements opposing the war. The Wilson administration barred Socialist newspapers from the mails, jailed a filmmaker for making a movie about the Revolutionary War (don’t rile our British allies), and prosecuted a minister who claimed Jesus was a pacifist. German-language books were removed from libraries, German-language newspapers were forced out of business, and one state banned speaking German outdoors.

It was an ugly period in our history. It’s also a reminder that big-government liberals can be as much inclined to suppress civil liberties as small-government conservatives can — or more so.

Presidents and attorneys general of both parties have been reluctant to use the Espionage Act when secret information has been leaked to the press because they have recognized that it is overbroad. They have understood, as Moynihan argues in Secrecy, that government classifies far too many things as secrets, even as it has often failed to protect information that truly needs to stay secret.

Barack Obama and his Justice Department seem to be of a different mind. They have used the Espionage Act of 1917 six times to bring cases against government officials for leaks to the media — twice as many as all their predecessors combined.

“Gradually, over time,” Moynihan writes, “American government became careful about liberties.” Now, suddenly, it seems to be moving in the other direction...