A lawsuit for the memorandum and related materials was filed under the Freedom of Information Act by The New York Times and two of its reporters, Charlie Savage and Scott Shane. Wednesday’s decision also rejected a broader request under the act from the American Civil Liberties Union.

David E. McCraw, a lawyer for The Times, said the paper would appeal.

“We began this litigation because we believed our readers deserved to know more about the U.S. government’s legal position on the use of targeted killings against persons having ties to terrorism, including U.S. citizens,” Mr. McCraw said. “Judge McMahon’s decision speaks eloquently and at length to the serious legal questions raised by the targeted-killing program and to why in a democracy the government should be addressing those questions openly and fully.”

Jameel Jaffer, a lawyer with the A.C.L.U., said his group also planned to appeal. “This ruling,” he said, “denies the public access to crucial information about the government’s extrajudicial killing of U.S. citizens and also effectively greenlights its practice of making selective and self-serving disclosures.”

A Justice Department spokesman said only that lawyers there were reviewing the decision.

Judge McMahon’s opinion included an overview of what she called “an extensive public relations campaign” by various government officials about the American role in the killing of Mr. Awlaki and the circumstances under which the government considers targeted killings, including of its citizens, to be lawful. The Times and the A.C.L.U. argued that the government had waived the right to withhold its legal rationale by discussing the program extensively in public.

(Samir Khan, a naturalized American citizen who lived at times on Long Island and in North Carolina, was also killed in the strike, on Sept. 30, 2011. Another strike two weeks later killed a group of people including Mr. Awlaki’s 16-year-old son, Abdulrahman al-Awlaki, who was born in Colorado.)