We study theoretically the emission of dark solitons induced by a moving defect in a nonresonantly pumped exciton-polariton condensate. The number of created dark solitons per unit of time is found to be strongly dependent on the pump power. We relate the observed dynamics of this process to the oscillations of the drag force experienced by the condensate. We investigate the stability of the polariton quantum fluid and present various types of dynamics depending on the condensate and moving obstacle parameters. Furthermore, we provide analytical expressions for dark soliton dynamics using the variational method adapted to the non-equilibrium polariton system. The determined dynamical equations are found to be in excellent agreement with the results of numerical simulations.