On July 19, 2017, it was announced that President Donald Trump had the intention of nominating Esper to become U.S. Secretary of the Army.[2] He is Trump's third nominee for the position, following the withdrawals of Vincent Viola and Mark E. Green.[3] He was confirmed by the Senate on November 15, 2017. He resigned on June 24, 2019 to become acting Defense Secretary.
President Donald Trump announced on June 18, 2019, that Esper would become acting Secretary of Defense.[4] Three days later, Trump nominated Esper to serve the job full time.[5] On July 23, 2019, his nomination was confirmed by a vote of 90–8.[6]
On November 5, 2020, shortly after the 2020 presidential election, it was reported that Esper had prepared a letter of resignation from his position as Secretary of Defense.[7] He was fired by President Trump four days later on November 9.[8]