No... All roads that access the coast run though Mexico City. The quickest way to get to either the Gulf Coast or Pacific coast is renting a car in Mexico City or taking a bus from one of the Central Bus Terminals in the City.
Gulf Coast: Four hours from Mexico City is the city of Veracruz. With warm Caribbean sounds and flavors, this is a great place to visit. If you are looking for a place to relax and unwind, i would suggest looking for a beach resort outside of the city to the north along the Gulf Coast. We suggest the stylish Hotel Azucar.
Pacific Coast: 229 miles south of Mexico City is Acapulco. There are a ton of 4-star hotel resorts to choose from in Acapulco, and most budget hotels are good for the price as well. I have never been here so can't suggest any of them.... Ask around.