Oncomelania hupensis (O. hupensis), the sole intermediate host of Schistosoma japonicum, greatly influence the prevalence and distribution of schistosomiasis japonica. The distribution area of O. hupensis has remained extensive for numerous years. This study aimed to establish a valid agent-based model of snail density and further explore the environmental conditions suitable for snail breeding. A marshland with O. hupensis was selected as a study site in Dongting Lake Region, and snail surveys were monthly conducted from 2007 to 2016. Combined with the data from historical literature, an agent-based model of snail density was constructed in NetLogo 6.2.0 and validated with the collected survey data. BehaviorSpace was used to identify the optimal ranges of soil temperature, pH, soil water content, and vegetation coverage for snail growth, development and reproduction. An agent-based model of snail density was constructed and showed a strong agreement with the monthly average snail density from the field surveys. As soil temperature increased, the snail density initially rose before declining, reaching its peak at around 21°C. There were similar variation patterns for other environmental factors. The findings from the model suggested that the optimum ranges of soil temperature, pH, soil water content and vegetation coverage were 19°C to 23 °C, 6.4 to 7.6, 42% to 75%, and 70% to 93%, respectively. A valid agent-based model of snail density was constructed, providing more objective information about the optimum ranges of environmental factors for snail growth, development and reproduction.