Boris Epshteyn, an official in the White House press office who had a contentious relationship with television producers and was once a frequent presence on TV himself, is leaving his job, according to three people with knowledge of the move.

The departure was treated with some mystery. Sean Spicer, the White House press secretary, would not comment on the reason Mr. Epshteyn, an old friend of President Trump’s son Eric, was expected to depart the post.

A senior administration official, speaking on the condition of anonymity, said only that officials were exploring other opportunities in the administration for Mr. Epshteyn, who at one point was on cable news as many as seven times a day promoting Mr. Trump during the presidential campaign.

Another person briefed on the discussions said that Mr. Epshteyn’s move was still pending, and that both he and the administration sought it. The person maintained that it was not an acrimonious situation.