While serving as an active-duty American soldier, Marchetti was recruited into the intelligence agencies in 1952 during the Cold War to engage in espionage against East Germany.
Marchetti's application for employment in the Central Intelligence Agency was accepted on October 3, 1955. On that day, he signed an oath stating that he would not divulge any classified information that he gleaned while employed at the CIA. Marchetti worked as a specialist on the USSR. He was a leading CIA expert on Third World aid, with a focus on USSR military supplies to Cuba after the end of the Kennedy administration.
In 1966, Marchetti was promoted to the office of special assistant to the Chief of Planning, Programming, and Budgeting, and special assistant to CIA Director Richard Helms. Among other projects with which he was involved, Marchetti worked on setting up the Pine Gap satellite ground station near Alice Springs in Central Australia. Within three years, Marchetti became disillusioned with the policies and practices of the CIA. On September 2, 1969, Marchetti resigned from the CIA, signing a second secrecy oath.
After leaving the CIA, Marchetti wrote a novel called The Rope-Dancer that accused the Agency of waste and interference in the affairs of other countries.
On December 12, 1972, the Supreme Court of the United States denied Marchetti's appeal challenging a CIA policy that former employees must submit materials to the Agency for approval prior to publication. Marchetti said he planned to continue with his book.
Later Marchetti published books critical of the CIA with author John D. Marks. The books included, The CIA and the Cult of Intelligence (1973). Before this book was published, the CIA demanded that Marchetti remove 399 passages, but Marchetti resisted and only 168 passages were censored. It is the first book the federal government of the United States ever went to court to censor before its publication. The publisher (Alfred A. Knopf) chose to publish the book with blanks for censored passages and with boldface type for passages that were challenged but later uncensored.
In 1976 Marchetti published Foreign and Military Intelligence and in 1978 he published an article about the JFK assassination in the far-right newspaper of the Liberty Lobby, The Spotlight. Marchetti, a proponent of the organized crime and the CIA conspiracy theory, claimed that the House Select Committee on Assassinations revealed a CIA memo from 1966 that named E. Howard Hunt, Frank Sturgis and Gerry Patrick Hemming in the JFK assassination. Marchetti also claimed that Marita Lorenz offered sworn testimony to confirm this. The HSCA reported that it had not received such a memo and rejected theories that Hunt was involved in a plot to kill Kennedy.
In 1981, E. Howard Hunt sued the Liberty Lobby and Marchetti for defamation and won $650,000 in damages. Liberty Lobby appealed the case with lawyer, Mark Lane. On February 1, 1985, Marchetti stated that key parts of his of articles were based upon rumors that he heard from Penthouse columnist Bill Corson and that he had no corroboration of Colson's story. Corson had provided an earlier deposition stating that he not discussed the rumors with Marchetti. Marchetti, Liberty Lobby and Lane won the appeal in 1985. Commenting afterward, two jurors rejected that the conspiracy theories offered by Lane influenced the verdict. Lane wrote a book, Plausible Denial, to describe the unfolding of that historic trial.