Under a simple shear flow and in a static external magnetic field, the production of defects in the director-aligning regime of nematic liquid crystals has been investigated in terms of the Leslie-Ericksen theory. The equation of motion of the nematic director, which conforms to the driven over-damped sine-Gordon equation, has a soliton solution of the amplitude w. We show that the stationary state with the director uniformly oriented at a Leslie angle is only a metastable state and the potential, which governs the motion of the director, has a nmnber of stable stationary states. For a strong magnetic field, the higher energy barrier between the stable and unstable states leads the director to be locked along the magnetic field direction. However, at the appropriate shear rate and magnetic field the defects, which appear as a stable solitary solution, can be nucleated from a uniformly aligned nematic liquid crystal. We have calculated the stationary travelling velocity of the solitary waves and the distance between a pair of defects.