A phase-field theory of dislocation dynamics, strain hardening and hysteresis in ductile single crystals is developed. The theory accounts for: an arbitrary number and arrangement of dislocation lines over a slip plane; the long-range elastic interactions between dislocation lines; the core structure of the dislocations resulting from a piecewise quadratic Peierls potential; the interaction between the dislocations and an applied resolved shear stress field; and the irreversible interactions with short-range obstacles and lattice friction, resulting in hardening, path dependency and hysteresis. A chief advantage of the present theory is that it is analytically tractable, in the sense that the complexity of the calculations may be reduced, with the aid of closed form analytical solutions, to the determination of the value of the phase field at point-obstacle sites. In particular, no numerical grid is required in calculations. The phase-field representation enables complex geometrical and topological transitions in the dislocation ensemble, including dislocation loop nucleation, bow-out, pinching, and the formation of Orowan loops. The theory also permits the consideration of obstacles of varying strengths and dislocation line-energy anisotropy. The theory predicts a range of behaviors which are in qualitative agreement with observation, including: hardening and dislocation multiplication in single slip under monotonic loading; the Bauschinger effect under reverse loading; the fading memory effect, whereby reverse yielding gradually eliminates the influence of previous loading; the evolution of the dislocation density under cycling loading, leading to characteristic ‘butterfly’ curves; and others.