And amid their back-and-forth, Ms. Anglin told Mr. Esposito about the plan for his resignation. She was not supposed to do so at that point, the official said, observing that usually someone does not get fired in his own office.

Mr. de Blasio, speaking Tuesday at an unrelated news conference on crime statistics, acknowledged that the meeting did not go as planned and became “emotional.” It ended with what he said was miscommunication and misunderstanding.

“In the heat of the moment, I think, because of the misunderstanding, a series of things went into motion,” Mr. de Blasio said vaguely.

Mr. Esposito did not take it well, the official said, but Ms. Anglin, as well as senior officials in City Hall, appeared to believe that he would follow what they termed an “order.” The first deputy commissioner, Calvin Drayton, apparently did so, accepting the request by City Hall that he resign.

Mr. Esposito did not see it the same way, according to a person briefed on the interaction, who said Mr. Esposito refused to go without being directly told by the mayor that he had been fired. The person requested anonymity to describe the private discussions.

But Mr. de Blasio was in Vermont over the weekend at a gathering hosted by Senator Bernie Sanders. The commissioner tried reaching him, to no avail, the person said. They did not speak.

The City Hall official disputed that account, saying that Mr. Esposito did not try to reach Mr. de Blasio directly over the weekend and did not tell Ms. Anglin that he wanted Mr. de Blasio to call him.