Urban expansion is influenced by complex and variable social, economic, natural, and policy-related factors. Given their nonlinear interactions, accurately modeling these urban expansion processes poses a challenge. While most studies treat the city as an independent entity, prioritizing internal urban factors, urban land expansion is influenced by intercity interactions and the ecological environment. This study proposes a new approach that couples the gravitational field model, ecological constraints, and the Future Land Use Simulation (FLUS) model, comprehensively considering the impact of intercity interaction and the ecological environment. The experiment in Henan Province in China assessed the effects of factors such as basic spatial variables (Slope and distance to the city center), urban gravitational field, and ecological constraints on urban expansion through the optimal parameters-based geographical detector (OPGD) model. The feasibility of the method was confirmed by this case study, which shows that it improves the simulation accuracy of the urban agglomeration scale, particularly for central cities. We identified the urban gravitational field and ecological constraints as two important factors affecting the expansion of urban agglomerations. Areas with stronger urban spatial fields are more likely to attract neighboring resources and promote urban expansion, whereas ecological factors constrain the expansion behavior of cities under the condition of ecological and environmental resource protection needs, and both of them work together to influence the expansion behavior of urban clusters. Therefore, we posit that intercity interactions and ecological constraints are important considerations for the future spatial planning of urban agglomerations and for coordinating the harmonious development of urbanization and ecological conservation.