Democrats and some environmental groups seized on the photos as evidence of the energy industry’s direct line to Mr. Perry, who had been in the job less than a month when the meeting occurred.

Mr. Edelman, who has not previously disclosed his identity as the source of the photographs, said in an interview that he wanted to expose the close relationship between the two men. Based on the “action plan” and conversations he overheard, Mr. Edelman said, Mr. Perry had tilted the administration’s energy policy to favor Murray Energy and other coal companies.

“It seemed like that was the right thing to do — exercising my First Amendment rights to get the information out there,” said Mr. Edelman, who had worked at the agency since 2015 and whose job included photographing events that the agency promoted in news releases, on the web and elsewhere.

The day after the photos were published by In These Times, a liberal magazine, the Energy Department put Mr. Edelman on administrative leave, seized his personal laptop and escorted him out of its headquarters in Washington, he said. He was later told, without explanation, that his employment agreement had not been renewed, internal agency emails show.