The paper presents the results of mathematical modeling of the process of launching and output to the mode of an oil well, which was uploaded by a well-killing liquid at the stage of repairs. After the launching of the electric submergible pump the drop of the bottomhole pressure occurs and the inflow of reservoir fluid begins. As a result the multicomponent mixture is generated inside the well, which consists of oil, associated water, well-killing liquid and free gas, originated from the oil during degassing, and this mixture is pumped out towards wellhead. As soon as the pump characteristics are changed, when the liquid with variable density is pumped out, it is necessary to control the speed of a shaft of the pump for providing the stable pump regime. This problem is solved in the paper for different ratios of densities of well-killing liquid and reservoir fluid by the mathematical modeling of multiphase flow in the well elements and inside the pump. As a mathematical model the one-dimensional quasi-stationary model in approach of drift for description of relative motion of the components is applied, which proved itself well for modeling of non-stationary processes lasting for several days. The comparison of calculated and measuring field parameters is presented. It is shown that the speed of washout of the well-killing liquid from the oil well and the probability of the pump stop due to its head failure depend on the ration of densities of the well-killing liquid and reservoir fluid. It is stated that the monitoring of change of parameters of the pump in time through the mathematical modeling can help to optimize the output to the mode of the well. This allows to avoid stops due to the pump head failure and to diminish the electricity costs.