The article proposes a mathematical model to describe the migration process of a certain population. This model is reduced to the Cauchy problem for some quasi-linear partial differential equation. The peculiarity of this model is that the dependence of its coefficient on the spatial coordinates is interpreted as a spatial heterogeneity of the stationary population size due to various natural or man-made factors. The article provides an exact solution to this Cauchy problem for an arbitrary stationary population size. In addition, this solution has been concretized for two qualitively different types of dependence of the stationary population size on the spatial coordinate, namely, for both step-like and hill-like stationary population sizes. It turned out that these concrete solutions are expressed through higher transcendental functions. Nevertheless, by selecting special relations between the parameters of the problem, in this case it was possible to circumvent the use of higher transcendental functions and obtain exact solutions to the model explicitly in terms of elementary functions. With the help of the obtained exact solutions of the proposed model, an extensive program of computational experiments has been implemented.