When Mayor Bill de Blasio announced on Wednesday night that he had chosen Alberto M. Carvalho, the charismatic superintendent of Miami-Dade County Public Schools, as his new schools chancellor, it seemed like a match made in heaven. Mr. Carvalho had an inspiring life story that mirrored the aspirations of many of New York City’s families. On policy, he and Mr. de Blasio seemed well aligned.

But there were signs, it emerged on Friday, that the partnership — on both sides — might have been far less than perfect. Mr. de Blasio, the more eager suitor, chose to overlook them. Mr. Carvalho, in the end, did not, leading him to reject the mayor’s job offer on Thursday.

For Mr. Carvalho, the red flags were indications that the mayor would heavily involve himself in the job, as he is known to do in other departments.

For City Hall, the warning signs were incidents in Mr. Carvalho’s past — his jilting of another school district in 2008, and a scandal over emails that suggested he had conducted an affair with a Miami Herald education reporter, which he has denied. In fact, those two matters had kept Mr. Carvalho out of the running for another major education job in New York just three years ago.