Short-term exposure to ambient air pollution has been proven to result in respiratory, cardiovascular, and digestive diseases, leading to increased emergency room visits (ERVs). Abdominal pain complaints provide a large proportion of the ERVs, as yet few studies have focused on the correlations between ambient air pollution and abdominal pain, especially in emergency departments within China. Daily data for daily ERVs were collected in Wuhan, China (from January 1, 2016 to December 31, 2018), including air pollution concentration (SO2, NO2, PM2.5, PM10, CO, and O3), and meteorological variables. We conducted a time-series study to investigate the potential correlation between six ambient air pollutants and ERVs for abdominal pain and their effects, in different genders, ages, and seasons. A total of 16,318 abdominal pain ERVs were identified during the study period. A 10-μg/m3 increase in concentration of SO2, NO2, PM2.5, PM10, CO, and O3 corresponded respectively to incremental increases in abdominal pain of 4.89% (95% confidence interval [CI]: − 1.50–11.70), 1.85% (95% CI: − 0.29–4.03), 0.83% (95% CI: − 0.05–1.72), − 0.22% (95% CI: − 0.73–0.30), 0.24% (95% CI: 0.08–0.40), and 0.86% (95% CI: 0.04 − 1.69). We observed significant correlations between CO and O3 and increases in daily abdominal pain ERVs and positive but insignificant correlations between the other pollutants and ERVs (except PM10). The effects were stronger for females (especially SO2 and O3: 13.53% vs. − 2.46%; 1.20% vs. 0.47%, respectively) and younger people (especially CO and O3: 0.25% vs. 0.01%; 1.36% vs. 0.15%, respectively). Males (1.38% vs. 0.87%) and elders (1.27% vs. 0.99%) were more likely to be affected by PM2.5. The correlations with PM2.5 were stronger in cool seasons (1.25% vs. − 0.07%) while the correlation with CO was stronger in warm seasons (0.47% vs. 0.14%). Our time-series study suggests that short-term exposure to air pollution (especially CO and O3) was positively correlated with ERVs for abdominal pain in Wuhan, China, and that the effects varied by season, gender and age. These data can add evidence on how air pollutants affect the human body and may prompt hospitals to take specific precautions on polluted days and maintain order in emergency departments made busier due to the pollution.