The unanimous three-judge panel, reversing a lower court decision, said the government had waived its right to keep the analysis secret in light of numerous public statements by administration officials and the Justice Department’s release of a “white paper” offering a detailed analysis of why targeted killings were legal.

“Whatever protection the legal analysis might once have had,” Judge Jon O. Newman wrote for the panel of the United States Court of Appeals for the Second Circuit, “has been lost by virtue of public statements of public officials at the highest levels and official disclosure of the D.O.J. White Paper.”

The decision reversed a January 2013 ruling by Judge Colleen McMahon of Federal District Court, who had expressed her own doubts about the legality of the targeted killings program and the secrecy cloaking it, but concluded that the government had not violated the law in refusing to turn over the materials sought in the requests.

Judge McMahon, however, issued her decision about a month before the Justice Department released its “white paper” after it was originally leaked to NBC News; the 16-page, single-spaced document made a detailed legal justification for the killing of Mr. Awlaki, which the appellate panel took into account in its ruling.

The panel also cited public statements by officials like Attorney General Eric H. Holder Jr. and John O. Brennan, when he was the president’s top counterterrorism adviser, discussing the lawfulness of the targeted killing of terrorists.

The panel, which also included Judges José A. Cabranes and Rosemary S. Pooler, did agree to a government request to redact certain portions of the legal analysis that it ordered released. Portions of the panel’s opinion were also redacted, with the possibility of restoration later, and the panel explained that it had filed its full opinion under seal, along with a redacted copy of the Justice Department memorandum that had been sought by the plaintiffs.

It was unclear how quickly the legal analysis might be made public; the government could ultimately seek review by the full appeals court or the Supreme Court. A Justice Department spokesman had no comment.

Steven Aftergood, a government secrecy specialist at the Federation of American Scientists, said the ruling was “clearly a rebuff to the administration’s secrecy policy.”

“What makes it particularly significant is that it applies not just to a single document but to a habitual practice of government officials,” he said, “which is to say, ‘I’m going to talk about something that’s classified, but I’m not going to give you the underlying records.’ ”

Jameel Jaffer, a lawyer with the American Civil Liberties Union, added: “This is a resounding rejection of the government’s effort to use secrecy, and selective disclosure, as a means of manipulating public opinion about the targeted killing program. The government can’t pretend that everything about its targeted killing program is a classified secret while senior officials selectively disclose information meant to paint the program in the most favorable light.”

Mr. Awlaki, a New Mexico-born cleric who the Obama administration contends had become a senior operative in the Yemen branch of Al Qaeda, was killed in a Sept. 30, 2011, drone attack that also killed Samir Khan, an American citizen who had moved to Yemen from North Carolina, and who administration officials say had not been specifically targeted.

The panel noted that the plaintiffs had not challenged the legality of drone strikes or targeted killings, and it said that the government had not waived secrecy concerning operational details in the memorandum, which it said had been prepared by the Justice Department’s Office of Legal Counsel, ran 41 pages and was dated July 16, 2010.

Judge Newman wrote that even if the public statements by administration officials, before and after Judge McMahon’s opinion was issued, were not themselves “sufficiently detailed to establish waiver of the secrecy of the legal analysis,” they established the “context in which the most revealing document,” the so-called white paper, “should be evaluated.”

The panel’s description of the classified Justice Department memorandum is redacted in the public opinion, but the panel also noted that Mr. Holder, before the Senate Judiciary Committee last year, “publicly acknowledged the close relationship” between the “white paper” and previous advice from the Office of Legal Counsel.

Judge Newman added that it was no longer either logical or plausible to maintain that disclosure of the legal analysis would risk disclosing “any aspect” of military plans, intelligence activities, sources and methods or foreign relations.