Bill Shine, the former Fox News executive who joined the White House staff last summer to manage President Trump’s communications operation, has resigned and will move to the president’s re-election campaign, the White House announced Friday.

Mr. Shine’s abrupt departure came as a surprise to many in the White House and was revealed, as such personnel moves often are in this administration, as the president was on Air Force One leaving Washington.

While described by admiring White House colleagues as a rare adult in the room, Mr. Shine has sometimes been absent during key moments, including the president’s trip last week to Vietnam. Colleagues said he had developed little chemistry with Mr. Trump, and critics increasingly focused on Mr. Shine’s ties to Fox, where he was forced out for his handling of sexual harassment claims.

In a meeting late Friday morning with communications staff members, Mr. Shine told colleagues that he was leaving for two reasons, according to a person familiar with what took place. He said that he lived a solitary existence in Washington and missed his family, who remained in New York. But the second reason, he said, was that he had become a distraction for Mr. Trump and did not see that changing.