The road distance between Mexico City (CDMX) in the Valley of Mexico and Cancún in Quintana Roo (Yucatán Peninsula) is approximately 1,253 kilometers (779 miles).
Mexico City → Puebla → Córdoba → Veracruz → Villahermosa → Campeche → Mérida → Cancún (mostly Highway 150D / 180D / 307).
Flying is overwhelmingly preferred; the drive is scenic but long.