Mr. Rood was part of the team at the Defense Department that told Congress last year that Ukraine had made the necessary changes to justify sending the country $250 million in promised security assistance. The certification was widely viewed as undermining a key argument that Mr. Trump’s defense team made during his impeachment battle: that Mr. Trump withheld the aid because he was concerned about corruption in Ukraine.

The president was impeached by the Democratic-controlled House but acquitted by the Republican-controlled Senate. Since his acquittal, Mr. Trump has moved swiftly to purge administration officials whose presentation of events did not align with his own.

In the days after his acquittal, Mr. Trump fired two of the most prominent witnesses in the House inquiry against him, Gordon D. Sondland, the ambassador to the European Union, and Lt. Col. Alexander S. Vindman, a decorated Iraq war veteran on the National Security Council staff.

Another Pentagon spokesman, Jonathan Hoffman, pushed back on Wednesday against speculation that Mr. Rood was pushed out of the government because of his role in supporting the security aid to Ukraine. “I have no information that would lead me to that conclusion,” Mr. Hoffman told reporters at the Pentagon.

Mr. Rood’s departure, reported earlier by CNN, was not entirely unexpected. He and Mr. Esper were known to clash frequently early in their careers, and Mr. Esper was expected to fire Mr. Rood after he became Defense Secretary last year. But the dearth of respected national security policy experts willing to work for Mr. Trump has made it difficult for administration officials to fill jobs.