Most dioecious plants are trees. However, because of the difficulty in determining sex from vegetative morphology, previous investigations of the sex ratios of dioecious trees were limited to flowering individuals, leading to inadequate and potentially unreliable data on patterns of sex ratios and the underlying mechanisms driving their variation. Here, we applied sex-specific molecular markers to investigate the sex ratio of a fully mapped population of the dioecious tree Diospyros morrisiana (Ebenaceae) in a subtropical forest. We also investigated the sexual dimorphism of life-history traits and spatial association between male and female trees to determine potential processes shaping the sex ratio at different life stages. Molecular sexing revealed a female-biased population sex ratio for this D. morrisiana population, contrasting with the male-biased operational (i.e., flowering) sex ratio. The sex ratio of D. morrisiana shifted from female-biased to male-biased over older life stages. We found that reproduction had a larger impact on the growth of female trees, which may account for the ontogenetic shift in sex ratio. There was no evidence of spatial segregation of the sexes beyond a scale of 2 m. Through molecular sexing of all individuals across all life stages, our work revealed for the first time a shift from a female- to a male-biased sex ratio in a huge population of a dioecious tree species. To better understand variation in sex ratios and the underlying mechanisms in dioecious trees, the sex of non-flowering and juvenile individuals should be included in future studies.