The vital document required while entering Mexico border is a Passport, especially when you are traveling by air. Also, it should have at least two blank pages for stamping by the Mexican authorities.
According to US Passport guide, there is no prerequisite for passport validity although your passport should not expire during your Mexico stay.
Additionally, for Americans travelling via road, an enhanced driver's license and a valid photo identity proof (birth certificate) is sufficient. Moreover, you don’t have to worry about the visa if your stay is less than 180 days in Mexico but you will definitely need a tourist card or Forma Migratoria Multiple (FMM). The FMM is free of cost.
For people coming from countries other than USA, a valid passport is a must for entering Mexico.