Which Terminal You Leave From
Mexico City has four long-distance bus terminals and only two of them matter for San Miguel de Allende. Most through services leave from Terminal Central de Autobuses del Norte (often just called TAPO's northern counterpart, Central del Norte), on Avenida de los Cien Metros in Gustavo A. Madero, connected to the Metro's Autobuses del Norte station on Line 5. A handful of departures use Terminal Poniente on Avenida Observatorio in Álvaro Obregón. Check your ticket before you book a taxi: crossing the city between them at rush hour takes 45 to 70 minutes.
Central del Norte is the one I would choose. It is the country's largest bus station, signage is decent, and there are food stalls and waiting rooms on both levels. Arrive 45 minutes before departure if you are buying on the day; the ticket windows for the Guanajuato-bound counters can queue badly on Friday afternoons and around public holidays. Poniente is smaller, calmer and easier to navigate but has fewer departures, so it suits travellers staying in Condesa, Roma or Santa Fe.
Operators, Journey Times and What It Costs
Two companies dominate the route. ETN runs a premium service with wide reclining seats, air conditioning and a toilet, usually non-stop or with one brief stop; Primera Plus runs more departures and a slightly more basic cabin. Journey time is roughly four to five hours depending on the service and traffic leaving the city. From Central del Norte you are usually on the Querétaro bypass within an hour, then heading northwest through San Juan del Río and across the Guanajuato state line.
Expect to pay in the region of 600 to 1,000 pesos one way, more for the executive seats and for departures at popular times. Buy at the terminal or through the operator's own website; booking two to three days ahead is sensible for weekend travel and essential around Easter, the last two weeks of December and the January folk-art fair in San Miguel. The comfortable seats are worth the small premium on this route — five hours in a standard cabin is fine, but the extra legroom makes it pleasant.
Booking the Right Departure
Early morning departures, roughly between 6am and 8am, are the ones I would take. You clear Mexico City before the worst of the traffic, arrive in San Miguel in the early afternoon, and still have daylight to walk the centro histórico. Late-afternoon buses sound appealing because you avoid an early alarm, but you hit the capital's evening congestion and reach San Miguel after dark, when the cobbled streets and the lack of pavement lighting make hauling luggage to a hotel genuinely awkward.
Note that services do not always terminate at San Miguel's own bus station on Calzada de la Estación, a 15-minute walk or short taxi ride from the Jardín Principal. Some continue to Dolores Hidalgo or Guanajuato, and a few drop passengers at the edge of town. Confirm at the counter. If your hotel is uphill in the residential streets above the centre, take a taxi from the station rather than walking with a suitcase — the gradients are steep and the cobbles are uneven.
The Alternative: Flying or Driving
The nearest airports are Del Bajío International (BJX) near León, about 90 minutes by road from San Miguel, and Querétaro International (QRO), roughly an hour and a quarter. Both have connections from Mexico City, but once you add the airport transfer, the flight and the onward shuttle, the bus is usually simpler and cheaper. Direct buses from Mexico City's airport exist but are infrequent, so most travellers still need to reach a terminal first.
Driving takes four to five hours via the Mexico–Querétaro toll road (Highway 57D) and the continuation toward San Miguel. The tolls are significant, and having a car in San Miguel is more nuisance than asset — parking in the centro is scarce and streets are narrow. I would book the bus and arrange a hotel within walking distance of the Jardín Principal. Skip the idea of a day trip from Mexico City; the round trip is nine to ten hours and leaves you three rushed hours in town.