From Wikipedia:
The Pentagon Papers, officially titled United States–Vietnam Relations, 1945–1967: A Study Prepared by the Department of Defense, was a top-secret United States Department of Defense history of the United States' political-military involvement in Vietnam from 1945 to 1967. The papers were first brought to the attention of the public on the front page of the New York Times in 1971.
Secretary of Defense Robert McNamara created the Vietnam Study Task Force on June 17, 1967, for the purpose of writing an "encyclopedic history of the Vietnam War". The secretary's motivation for commissioning the study is unclear. McNamara claimed that he wanted to leave a written record for historians, but kept the study secret from the rest of the Johnson administration. Neither President Lyndon Johnson nor Secretary of State Dean Rusk knew about the study until its publication; they believed McNamara might have planned to give the work to his friend Robert F. Kennedy, who sought the Democratic presidential nomination in 1968.
Instead of using existing Defense Department historians, McNamara assigned his close aide and Assistant Secretary of Defense John T. McNaughton, McNaughton's aide Morton H. Halperin, and Defense Department official Leslie H. Gelb to lead the task force. Thirty-six analysts—half of them active-duty military officers, the rest academics and civilian federal employees—worked on the study. The analysts largely used existing files in the Office of the Secretary of Defense and did no interviews or consultations with the armed forces, the White House, or other federal agencies to keep the study secret from others, including National Security Advisor Walt W. Rostow.
McNamara left the Defense Department in February 1968 and his successor Clark M. Clifford received the finished study on 15 January 1969, five days before Richard Nixon's inauguration, although Clifford claimed he never read it. The study comprised 3,000 pages of historical analysis and 4,000 pages of original government documents in 47 volumes, and was classified as "Top Secret - Sensitive". "Sensitive" is not an official security designation; it meant that the study's publication would be embarrassing. The task force published 15 copies; think tank RAND Corp received two of the copies from Gelb, Halperin, and Paul Warnke, with access granted if two of the three approved.
Daniel Ellsberg knew the leaders of the task force well. He had worked as an aide to McNaughton from 1964 to 1965, had worked on the study for several months in 1967, and in 1969 Gelb and Halperin approved his access to the work at RAND (which was given 2 of the 15 copies made). Now opposing the war, Ellsberg and his friend Anthony Russo photocopied the study in October 1969 intending to disclose it. He approached Nixon National Security Advisor Henry Kissinger, Senators William Fulbright and George McGovern, and others, but nobody was interested.
In February 1971 Ellsberg discussed the study with New York Times reporter Neil Sheehan, and gave 43 of the volumes to him in March. The Times began publishing excerpts on June 13, 1971. The Papers revealed that the U.S. had deliberately expanded its war with bombing of Cambodia and Laos, coastal raids on North Vietnam, and Marine Corps attacks, none of which had been reported by media in the US. The most damaging revelations in the papers revealed that four administrations, from Truman to Johnson, had misled the public regarding their intentions.
Prior to publication, the New York Times sought legal advice. The paper's regular outside counsel, Lord Day & Lord, advised against publication, but house counsel James Goodale prevailed with his argument that the press had a First Amendment right to publish information significant to the people's understanding of their government's policy.
President Nixon's first reaction to the publication was that since the study embarrassed the Johnson and Kennedy administrations, not his, he should do nothing. However, Kissinger convinced the president that not opposing publication set a negative precedent for future secrets. The administration argued Ellsberg and Russo were guilty of felony treason under the Espionage Act of 1917, because they had no authority to publish classified documents. After failing to persuade the Times to voluntarily cease publication on June 14, Attorney General John N. Mitchell and Nixon obtained a federal court injunction forcing the Times to cease publication after three articles. The newspaper appealed the injunction, and the case New York Times Co. v. United States (403 U.S. 713) quickly rose through the U.S. legal system to the Supreme Court.
On June 18, 1971, the Washington Post began publishing its own series of articles based upon the Pentagon Papers. That day, Assistant U.S. Attorney General William Rehnquist asked the paper to cease publication. After it refused, Rehnquist unsuccessfully sought an injunction at a U.S. district court. The government appealed that decision, and on June 26 the Supreme Court agreed to hear it jointly with the New York Times case. Fifteen other newspapers received copies of the study and began publishing it.
On June 30, 1971, the Supreme Court decided, 6–3, that the government failed to meet the heavy burden of proof required for prior restraint injunction, although all nine justices wrote opinions disagreeing on substantive matters.
Ellsberg surrendered to authorities in Boston and admitted that he had given the papers to the press. He was later indicted on charges of stealing and holding secret documents by a grand jury in Los Angeles. Federal District Judge Byrne declared a mistrial and dismissed all charges against Ellsberg (and Russo) on May 11, 1973, after several irregularities appeared in the government's case, including its claim that it had lost records of illegal wiretapping against Ellsberg conducted by the White House Plumbers in the contemporaneous Watergate scandal.
Although the entire Pentagon Papers study has been published by several sources, the work remains classified.