Background and Aims: Cotton (Gossypium hirsutum) has indeterminate growth. The growth regulator mepiquat chloride (MC) is used worldwide to restrict vegetative growth and promote boll formation and yield. The effects of MC are modulated by complex interactions with growing conditions (nutrients, weather) and plant population density, and as a result the effects on plant form are not fully understood and are difficult to predict. The use of MC is thus hard to optimize. Methods: To explore crop responses to plant density and MC, a functional–structural plant model (FSPM) for cotton (named CottonXL) was designed. The model was calibrated using 1 year's field data, and validated by using two additional years of detailed experimental data on the effects of MC and plant density in stands of pure cotton and in intercrops of cotton with wheat. CottonXL simulates development of leaf and fruits (square, flower and boll), plant height and branching. Crop development is driven by thermal time, population density, MC application, and topping of the main stem and branches. Key Results: Validation of the model showed good correspondence between simulated and observed values for leaf area index with an overall root-mean-square error of 0·50 m2 m-2, and with an overall prediction error of less than 10 % for number of bolls, plant height, number of fruit branches and number of phytomers. Canopy structure became more compact with the decrease of leaf area index and internode length due to the application of MC. Moreover, MC did not have a substantial effect on boll density but increased lint yield at higher densities. Conclusions: The model satisfactorily represents the effects of agronomic measures on cotton plant structure. It can be used to identify optimal agronomic management of cotton to achieve optimal plant structure for maximum yield under varying environmental conditions.