For years, a joke among Trump Tower employees was that the boss was like Manhattan’s First Avenue, where the traffic goes only one way.

That one-sidedness has always been at the heart of President Trump’s relationship with his longtime lawyer and fixer, Michael D. Cohen, who has said he would “take a bullet” for Mr. Trump. For years Mr. Trump treated Mr. Cohen poorly, with gratuitous insults, dismissive statements and, at least twice, threats of being fired, according to interviews with a half-dozen people familiar with their relationship.

“Donald goes out of his way to treat him like garbage,” said Roger J. Stone Jr., Mr. Trump’s informal and longest-serving political adviser, who, along with Mr. Cohen, was one of five people originally surrounding the president when he was considering a presidential campaign before 2016.

Now, for the first time, the traffic may be going Mr. Cohen’s way. Mr. Trump’s lawyers and advisers have become resigned to the strong possibility that Mr. Cohen, who has a wife and two children and faces the prospect of devastating legal fees, if not criminal charges, could end up cooperating with federal officials who are investigating him for activity that could relate, at least in part, to work he did for Mr. Trump.