These are really two different kinds of Mexico trip — Mexico City is a dense, historic megacity built on culture, food, and museums, while Cancun is a purpose-built beach resort and the gateway to the Riviera Maya's ancient sites and cenotes.
Mexico City's Mexico City Metropolitan Cathedral and Museo Nacional de Antropología reflect a capital with centuries of layered history, plus world-class art at the Frida Kahlo Museum. Cancun has essentially no historic city center of its own — it was built specifically as a resort destination starting in the 1970s.
Mexico City's Templo Mayor and the nearby Pirámides de Teotihuacán are among the most significant ancient sites in the Americas. Cancun's region counters with Chichen Itza and Tulum Ruins, both easy day trips and arguably more visually dramatic given Tulum's clifftop setting over the Caribbean.
This is Cancun's whole reason for being: Playa Delfines and the turquoise Caribbean coastline, plus a short ferry to Playa Norte (Isla Mujeres). The surrounding region also has Gran Cenote and other cenotes — freshwater sinkholes found almost nowhere else on earth. Mexico City is landlocked, over 2,000 meters above sea level, with no beach access at all.
Both cities have major international airports, so access isn't a differentiator. Mexico City rewards a slower, walkable, culture-and-food-focused trip, while Cancun and the surrounding Riviera Maya are built around resorts, all-inclusive stays, and organized day tours to nearby ruins and cenotes.
Choose Mexico City for museums, ancient ruins, and one of the best food scenes in the Americas. Choose Cancun for Caribbean beaches, cenotes, and easy access to Chichen Itza and Tulum. They're a long way apart and rarely combined on a single trip — most travelers pick one based on whether they want a city trip or a beach vacation.