He also has walked a fine line on climate change. Mr. Brouillette has described planetary warming as “something we need to work on” but has questioned the scientific consensus that climate change poses a serious threat. He has promoted statistics that show American emissions have fallen 13 percent since 2005, but he also is a critic of the Paris Agreement, a pledge among nearly every nation to curb emissions that Mr. Trump intends to abandon next November.

Mr. Brouillette has argued that reductions of planet-warming greenhouse gas emissions in the United States are being nullified by rising emissions in China.

In replacing Mr. Perry, Mr. Brouillette becomes the latest lobbyist and seasoned second-in-command to take over for an embattled, higher-profile cabinet secretary.

Last year Andrew Wheeler, a former coal lobbyist who worked as the deputy administrator of the Environmental Protection Agency under Scott Pruitt, took the helm when Mr. Pruitt resigned amid ethics scandals. David Bernhardt, an oil and gas lobbyist, served as deputy to Ryan Zinke, Mr. Trump’s first secretary of the Interior Department, then assumed the top position when Mr. Zinke departed, also facing ethics investigations.

Mr. Perry, a former Texas governor who once embraced abolishing the Energy Department, has largely avoided scandal, and Mr. Trump has at various times reportedly considered him for other high-profile posts in the administration. Mr. Perry has returned the admiration, saying recently that Mr. Trump was “ordained by God” to lead the country.

But in recent weeks, Mr. Perry has emerged as a player in the impeachment proceedings against Mr. Trump, facing scrutiny over his role in promoting energy exports to Ukraine and whether he was involved in the withholding of military aid to the country.

Sunday was Mr. Perry’s final day in office, and he released a farewell video saying his service as energy secretary had been a “wonderful, fabulous trip.” He applauded his country’s status as the world’s top oil and gas producer.