It has been documented that the epidemiological characteristics of human infections with H7N9 differ significantly between H5N1. However, potential factors that may explain the different spatial distributions remain unexplored. We use boosted regression tree (BRT) models to explore the association of agro-ecological, environmental and meteorological variables with the occurrence of human cases of H7N9 and H5N1, and map the probabilities of occurrence of human cases. Live poultry markets, density of human, coverage of built-up land, relative humidity and precipitation were significant predictors for both. In addition, density of poultry, coverage of shrub and temperature played important roles for human H7N9 infection, whereas human H5N1 infection was associated with coverage of forest and water body. Based on the risks and distribution of ecological characteristics which may facilitate the circulation of the two viruses, we found Yangtze River Delta and Pearl River Delta, along with a few spots on the southeast coastline, to be the high risk areas for H7N9 and H5N1. Additional, H5N1 risk spots were identified in eastern Sichuan and southern Yunnan Provinces. Surveillance of the two viruses needs to be enhanced in these high risk areas to reduce the risk of future epidemics of avian influenza in China.