Hoover and the Feds seem to have been genuinely shocked by King’s behavior. Here was a minister, the leader of a moral movement, acting like “a tom cat with obsessive degenerate sexual urges,” Hoover wrote on one memo. In response, F.B.I. officials began to peddle information about King’s hotel-room activities to friendly members of the press, hoping to discredit the civil rights leader. To their astonishment, the story went nowhere. If anything, as the F.B.I. learned more about his sexual adventures, King only seemed to be gaining in public stature. In 1964, the Civil Rights Act passed Congress, and just a few months later King became the youngest man ever to be awarded the Nobel Peace Prize.

At this point Hoover decided to escalate his campaign. On Nov. 18, 1964 — 50 years ago this week — Hoover denounced King at a Washington news conference, labeling him the “the most notorious liar in the country.” A few days later, one of Hoover’s deputies, William Sullivan, apparently took it upon himself to write the anonymous letter and sent an agent to Miami, to mail the package to Atlanta.

Even now, looking at a full copy of the letter, it’s tough to puzzle out just what the bureau wanted King to do. The largest unredacted section focuses on King’s sex life, recounting in graphic language what the bureau believed it knew. Another uncovered portion of the note praises “older leaders” like the N.A.A.C.P. executive director Roy Wilkins, urging King to step aside and let other men lead the civil rights movement. And some maintain that they simply meant to push King out, not induce suicide.

Whatever it was the F.B.I. hoped King would do, they probably preferred it to happen before the Nobel ceremony, scheduled for mid-December. But King did not even see the package until after his trip to Oslo. According to his biographer David Garrow, it was King’s wife, Coretta, who first opened it, expecting to find a recording of one of her husband’s speeches. She turned the contents over to King, who assembled a group of confidants to sort out a response. As King’s closest friends and associates recalled, everyone immediately agreed the letter could only be the work of one institution: Hoover’s F.B.I.

Today it is almost impossible to imagine the press refusing a juicy story. To a scandal-hungry media, the bedroom practices of our public officials and moral leaders are usually fair game. And a sex scandal is often — though not always — a cheap one-way ticket out of public life. Faced with today’s political environment, perhaps King would have made different decisions in his personal affairs. Perhaps, though, he never would have had the chance to emerge as the public leader he ultimately became.

Luckily, in 1964 the media were far more cautious. One oddity of Hoover’s campaign against King is that it mostly flopped, and the F.B.I. never succeeded in seriously damaging King’s public image. Half a century later, we look upon King as a model of moral courage and human dignity. Hoover, by contrast, has become almost universally reviled. In this context, perhaps the most surprising aspect of their story is not what the F.B.I. attempted, but what it failed to do.

The current F.B.I. director, James Comey, keeps a copy of the King wiretap request on his desk as a reminder of the bureau’s capacity to do wrong. But elsewhere in Washington, the debate over how much the government should know about our private lives has never been more heated: Should intelligence agencies be able to sweep our email, read our texts, track our phone calls, locate us by GPS? Much of the conversation swirls around the possibility that agencies like the N.S.A. or the F.B.I. will use such information not to serve national security but to carry out personal and political vendettas. King’s experience reminds us that these are far from idle fears, conjured in the fevered minds of civil libertarians. They are based in the hard facts of history.