Carranza has been superintendent in Houston since August 2016.
Carranza, 51, is the grandson of Mexican immigrants who taught bilingual social studies and music in Tucson before becoming a regional superintendent in Las Vegas. He also spent four years leading schools in San Francisco.
Houston is the nation's seventh-largest school system with 290 schools and 216,000 students.
The announcement comes days after Miami's schools superintendent accepted the post and then backed out.
Alberto Carvalho said Thursday he was breaking his agreement with New York City because of emotional pleas from the Miami schools community to stay.
Chancellor Carmen Farina is retiring, but will stay until the end of March.
de Blasio took no chances with Carranza backing out, entering City Hall together for Monday afternoon's news conference.
The mayor described Carranza as "an educator's educator" and someone who can relate to parents and their children.
de Blasio said he offered the job to Carranza on Sunday night. He will earn the same base salary that he made in Houston, $345,000.
Carranza says he's "incredibly honored" to be chosen.
He said he still has some work to finish up in Houston as well as find a place to live in New York City.
"As the son of blue collar workers and a lifetime educator, it is an honor to serve New York City's 1.1 million children as Schools Chancellor," said Carranza.
VIDEO: Carranza's full remarks