The districts Mr. Carranza led have not attracted the national buzz of places like Washington, D.C., or even smaller school systems like Newark’s, but he has been courted by big cities before. In 2015, he was in the running to lead the Los Angeles Unified School District. An article in The Los Angeles Times said his focuses in San Francisco on reducing suspensions and expanding access to technology were priorities in Los Angeles, as well. But Mr. Carranza removed himself from the competition, saying he wanted to stay on in San Francisco.

Then in 2016, he moved on to Houston. Greg Meyers, a former member of the Houston school board who was involved in hiring Mr. Carranza, said that “his drive toward equity,” which the board took to be heartfelt, “was something that really stood out.”

In Houston, Mr. Carranza took over a district four times as large as San Francisco’s, one that has presented him with a long list of challenges. It faces a $115 million budget shortfall and a potential takeover by the state’s education agency because it failed to improve chronically low-performing schools. Hurricane Harvey wreaked havoc on school buildings and the city’s neighborhoods, diminished enrollment and threatened property values, which could mean less money for the district.

Mr. Carranza also reported to a nine-member school board where each member is elected by a separate district, which meant their interests could often be at odds.

“I think he really, really struggled to define where it was he wanted to take Houston,” said Anna Eastman, a former president of the Houston school board who was on the board during Mr. Carranza’s first year. “I think it’s hard for anyone to serve in that role with a board that is not really united around a common vision.”

The central goals Mr. Carranza articulated in Houston revolved around giving poor students a better shot. One of his major, and most controversial, plans involved making changes to the city’s magnet-school programs by giving some preference to children from low-income families and eliminating many of the test-score and academic requirements. Houston’s high-performing magnet schools are dominated by white middle-class families, and factions of the board are fierce defenders of the current rules.