He is the second person to be given a prominent role in the Trump administration this month after publicly backing aggressive immigration policies on cable news, which Mr. Trump consumes with gusto. Mr. Trump named Mark Morgan, who was forced out as Border Patrol chief two days after Mr. Trump took office, to lead Immigration and Customs Enforcement.

Mr. Cuccinelli served as attorney general in Virginia from 2010 to 2014, running unsuccessfully for governor there in 2013. A prominent conservative, he supported Senator Ted Cruz of Texas for president in 2016, leading an effort to win over delegates to the party’s convention, including those supporting Mr. Trump. That kind of history has kept other officials from jobs they had hoped to get in the Trump administration.

Cecilia Muñoz, the director of the domestic policy council in the Obama administration, said the appointment of Mr. Cuccinelli was concerning given his support in the past for denying citizenship to American-born children of undocumented immigrants and for a proposal to allow employers to fire workers who do not speak English on the job.

“It’s hard to put into words,” Ms. Muñoz said. “The president is trying to send an ever tougher message, but ultimately these things are symbols just in the same way the wall is a symbol. Even if you are desperate to show how tough you are, you’re not likely to produce a policy that addresses the problems at the border or the interior.”

Mr. Cuccinelli and Kris Kobach, the former Kansas secretary of state, were both under consideration for the immigration role. But Mr. Cuccinelli was always seen within the White House as the favorite, and Mr. Kobach did not help his case with Mr. Trump and some of his advisers with a list of the 10 “requirements” he had for taking the job, including access to a government jet 24 hours a day, weekends off with his family in Kansas and a promise to be nominated for Mr. McAleenan’s job by November if he wanted it.