WASHINGTON — President Trump will nominate Patrick M. Shanahan as his second defense secretary, trying to cement the acting Pentagon chief against an expected challenging battle with lawmakers and Defense Department officials skeptical of him, White House officials said on Thursday.

The announcement, in a tweet from Sarah Huckabee Sanders, the White House press secretary, followed a monthlong Pentagon ethics investigation that found that Mr. Shanahan, a former Boeing executive, had not acted improperly in official meetings when discussing military contractors.

Announcing the nomination in a Twitter statement from his press secretary, Mr. Trump eschewed the usual pomp and ceremony that comes with putting forth his nominee to lead the country’s 1.2 million active-duty military troops.

Ms. Sanders said that Mr. Trump intended to nominate Mr. Shanahan because of his “outstanding service to the country and his demonstrated ability to lead.” She trumpeted Mr. Shanahan’s dual graduate degrees, in engineering and business administration, from the “Massachusetts Institution of Technology.” (It is actually the Massachusetts Institute of Technology.)