In this paper we consider heterogeneous diffusion processes with the power-law dependence of the diffusion coefficient on the position and investigate the influence of external forces on the resulting anomalous diffusion. The heterogeneous diffusion processes can yield subdiffusion as well as superdiffusion, depending on the behavior of the diffusion coefficient. We assume that not only the diffusion coefficient but also the external force has a power-law dependence on the position. We obtain analytic expressions for the transition probability in two cases: when the power-law exponent in the external force is equal to 2η − 1, where 2η is the power-law exponent in the dependence of the diffusion coefficient on the position, and when the external force has a linear dependence on the position. We found that the power-law exponent in the dependence of the mean square displacement on time does not depend on the external force, this force changes only the anomalous diffusion coefficient. In addition, the external force having the power-law exponent different from 2η − 1 limits the time interval where the anomalous diffusion occurs. We expect that the results obtained in this paper may be relevant for a more complete understanding of anomalous diffusion processes.