Mr. Bolton, who was considered a hawk among hawks in President George W. Bush’s administration, had a history of incendiary comments that primed him to be a commentator on Fox News. There, he impressed Mr. Trump with his muscular version of American power.

News that Mr. Bolton would become Mr. Trump’s third national security adviser — after General McMaster and Michael T. Flynn — was met with immediate acclaim and criticism.