When Donald J. Trump traveled to Iowa before the caucuses, Keith Schiller was by his side. When Mr. Trump wanted to eject a Univision reporter from a news conference, he merely glanced at Mr. Schiller and it happened. And when Mr. Trump spent his first few weeks as president in virtual solitude in the White House residence, Mr. Schiller eased his loneliness.

Mr. Schiller is formally the head of Oval Office operations, a loosely defined role that gave him a spot directly outside the president’s office. In reality, his relationship with Mr. Trump is deeper and spans decades.

But after seven months, Mr. Schiller is planning his departure from the White House, three people familiar with his thinking said, asking for anonymity to reveal private discussions. It could come as soon as two weeks from now, or be closer to the holidays, one of those briefed on the discussions said.

A gangly former New York Police Department detective, Mr. Schiller in 2004 became the head of security at Trump Tower in Manhattan, and he has been Mr. Trump’s bodyguard and emotional safety blanket ever since.