Mr. Klein benefited from two historic conditions. He was the first chancellor appointed by the mayor and, as such, was answerable only to him, which gave him power and security. And he was part of — and widely considered a leader in — a national effort for greater accountability in public education shared across partisan lines.

Mr. Klein said he made a final decision to join News Corporation in the last week, a hire that puts a respected official with Democratic credentials — he was a top antitrust lawyer in President Bill Clinton’s Justice Department — in the executive suite at Rupert Murdoch’s conservative-leaning news media giant. A person familiar with the negotiations at News Corporation said Mr. Klein would be charged with pursuing “entrepreneurial ventures” that cater to the educational marketplace.

Despite the mayor’s praise and an apparent deep admiration for Mr. Klein, one former senior Bloomberg administration official, speaking on the condition of anonymity because he did not want to jeopardize his relationship with City Hall, said that many people in the mayor's bullpen were dissatisfied with Mr. Klein because “he’s been a political load for a while.”

One of the first concrete signs that Mr. Klein was not long for the job was the appointment of Sharon L. Greenberger as the Education Department’s chief operating officer in April — something that, according to the official, “was imposed over Joel’s objection.”

Mr. Klein will remain with the city until the end of the year to help with Ms. Black’s transition. In an interview Tuesday, Mr. Klein was clear about his accomplishments as chancellor. When he accepted the job, he was part of a rising educational reform movement that drew lessons from the corporate world, like increasing parent choice through innovations like charter schools, weakening traditional union protections like tenure and bringing numbers-based accountability to schools to evaluate and rank them and to improve teaching.

“It’s a much more performance-driven system, and a much more professional system, and less politicized than when I started,” Mr. Klein said.