WASHINGTON — President Trump announced on Friday the departure of Kevin K. McAleenan, the acting secretary for the Department of Homeland Security who spent his six-month tenure trying to curb a surge of asylum seekers at the southwestern border while managing a turbulent relationship with a president intent on restricting immigration.
Noting that they have “worked well together with Border Crossings being way down,” Mr. Trump said on Twitter that Mr. McAleenan wanted “to spend more time with his family and go to the private sector.”
Mr. McAleenan’s exit from the White House came after he tried publicly to embrace the president’s increasingly aggressive assault on legal and illegal immigration even as he privately resisted some of Mr. Trump’s most extreme ideas.
In an interview last week with The Washington Post, Mr. McAleenan complained about what he called the “tone, the message, the public face and approach” of immigration policy — a not-so-subtle reproach of the president’s own language about the border.
The comments enraged some of the president’s staunch allies, who called it an unforgivable public statement about his boss.
At the same time, Mr. McAleenan drew furious criticism from Democrats and immigration activists, who blamed him for going along with the president’s efforts to separate families at the border, block asylum seekers and deny green cards to poor immigrants.
On Monday, Mr. McAleenan was forced off the stage at Georgetown Law School, where he was scheduled to participate in an immigration forum. Protesters held signs that said “Stand with immigrants” and “Hate is not normal.” They chanted until he left the stage.
In his announcement, the president said that he would name a new acting secretary next week, but it was not immediately clear who would succeed Mr. McAleenan.
Mr. McAleenan, the president’s fourth homeland security secretary, appeared to be on his way out almost from the moment he replaced Kirstjen Nielsen, who was fired in April by Mr. Trump in a purge of several top immigration officials in the administration.
The president never nominated Mr. McAleenan to permanently assume the position and sometimes offered weak praise for the job he was doing. For the last several months, Mr. McAleenan, a career law enforcement official, has watched as the White House surrounded him with immigration hard-liners to oversee parts of his jurisdiction.
Kenneth T. Cuccinelli II, who once advocated an end to birthright citizenship, was installed to lead the agency that manages legal immigration. Mark Morgan, who once said he could determine future gang members by looking at detained migrant children, was selected to oversee Immigration and Customs Enforcement. And Thomas D. Homan, who has supported the president’s separation of families in appearances on Fox News, was mentioned as a possible border czar to coordinate border policy.
Under the Vacancies Act, which stipulates that the position must go to certain ranked officials in the department, none of those hard-liners can immediately succeed Mr. McAleenan. Mr. Cuccinelli would face strong opposition from the Senate majority leader, Mitch McConnell of Kentucky, for his political efforts to back insurgent Senate candidates, including one challenging Mr. McConnell.
Mr. McAleenan, a former lawyer who once served in the Obama administration, oversaw homeland security as it grappled with the highest number of crossings at the southwestern border in more than a decade, prompting the White House to issue aggressive policies against one of its closest allies.