President Trump will name Chad Wolf to be the next acting secretary of the Department of Homeland Security, the fifth person in the administration to lead the agency responsible for securing the country.

Mr. Wolf was the chief of staff to Kirstjen Nielsen, who was the homeland security secretary until she was replaced this year by Kevin McAleenan, who said last month that he would resign.

Mr. McAleenan will step down from the position after Nov. 11, Hogan Gidley, a spokesman for the White House, said on Friday. “As the president has said, Kevin McAleenan has done a tremendous job,” Mr. Gidley said. “After he departs, Chad Wolf will serve as acting capacity in the interim.”

He declined to say whom the president would nominate to lead the department on a permanent basis.

Confusion over Mr. Wolf’s post spread for about two hours late Friday after the president, responding to rumors that Mr. Wolf would oversee the department, told reporters: “Well, he’s right now acting and we’ll see what happens. We have great people in there.”