Epidemic dynamics in a structured population has been widely investigated in recent years by utilizing the metapopulation framework with a reaction-diffusion approach. In this paper, we study epidemic spreading on metapopulation networks, including migration and demographics, wherein population dynamics in each node (a patch) follows the logistic model with a heterogeneous carrying capacity. The epidemic threshold is theoretically calculated at a mean-field level and is then evaluated by Monte Carlo simulations. It is shown that heterogeneity of carrying capacity drastically decreases the threshold, and conversely increasing the migration rate slightly increases the threshold. Interestingly, we observe Monte Carlo simulations showing the effect of heterogeneity of carrying capacity and migration on the epidemic prevalence above the epidemic threshold. Heterogeneity of carrying capacity enhances epidemic spreading in the initial stage, but has no impact on the final infection density. The migration rate has a pronounced impact on both temporal spreading behaviour and endemic state.