Mexico is one of the most biodiverse countries in the world, with an important proportion of endemism mainly because of the convergence of the Nearctic and Neotropical biogeographic regions, which generate great diversity and species turnover at different spatial scales. However, most of our knowledge of the Mexican ant biota is limited to a few well-studied taxa, and we lack a comprehensive synthesis of ant biodiversity information. For instance, most of the knowledge available in the literature on Mexican ant fauna refers only to species lists by states, or is focused on only a few regions of the country, which prevents the study of several basic and applied aspects of ants, from diversity and distribution to conservation. Our aims in this data paper are therefore (1) to compile all the information available regarding ants across the Mexican territory, and (2) to identify major patterns in the gathered data set and geographic gaps in order to direct future sampling efforts. All records were obtained from raw data, including both unpublished and published information. After exhaustive filtering and updating information and synonyms, we compiled a total of 21,731 records for 887 ant species distributed throughout Mexico from 1894 to 2018. These records were concentrated mainly in the states of Chiapas (n = 6,902, 32.76%) and Veracruz de Ignacio de la Llave (n = 4,329, 19.92%), which together comprise half the records. The subfamily with the highest number of records was Myrmicinae (n = 10,458 records, 48.12%), followed by Formicinae (n = 3,284, 15.11%) and Ponerinae (n = 1,914, 8.8%). Most ant records were collected in the Neotropical region of the country (n = 12,646, 58.19%), followed by the Mexican transition zone (n = 5,237, 24.09%) and the Nearctic region (n = 3,848, 17.72%). Native species comprised 95.46% of the records (n = 20,745). To the best of our knowledge, this is the most complete data set available to date in the literature for the country. We hope that this compilation will encourage researchers to explore different aspects of the population and community research of ants at different spatial scales, and to aid in the establishment of conservation policies and actions. There are no copyright restrictions. Please cite this data paper when using its data for publications or teaching events.