Environmental heterogeneity in resource availability affects invasive plant reproductive strategies and resource allocation to reproduction. Here, we conducted two field surveys to examine the effect of wetland and terrestrial habitats on inflorescence production and resource allocation to inflorescence of the amphibious invasive plant Alternanthera philoxeroides in its invasive range (China). We also specifically examined the effects of water availability, fertilizer application, and plant density (space) in a greenhouse experiment. In field surveys, inflorescence biomass, normal monoclinous flowers and ratio of inflorescences to shoots of plants from wetlands were about 2.4-, 0.8- and 1.3-fold higher than those from terrestrial habitats, respectively. In greenhouse experiment, plants with higher fertilizer application and lower competition conditions produced more inflorescences, and had a lower ratio of roots to shoots and a comparable ratio of inflorescences to shoot and root. Furthermore, water availability had a significant interactive effect when combined with fertilizer level or plant density on inflorescence production and resource allocation. Together, our results indicate that high resources, such as those found in wetland habitats, favor both vegetative growth and sexual trait in A. philoxeroides. However, in terrestrial habitats where resources are relatively poor, the invader can adapt to the environment by allocating more resources to vegetative growth for clonal reproduction and less resources for sexual trait. This phenotypic plasticity in resource allocation likely facilitates the plant to invade heterogeneous wetlands and terrestrial environments.