During the growth of a cold dark matter halo, the direction of its spin can undergo rapid changes. These could disrupt or even destroy a stellar disc forming in the halo, possibly resulting in the generation of a bulge or spheroid. We investigate the frequency of significant changes in the orientation of the angular momentum vector of dark matter haloes (‘spin flips’) and their degree of correlation with mergers. We focus on haloes of mass similar to that of the Milky Way halo at redshift z= 0 (log10 M/h−1 M⊙= 12.0 → 12.5) and consider flips in the spin of the whole halo or just its inner parts. We find that a greater fraction of major mergers are associated with large spin flips than minor mergers. However, since major mergers are rare, the vast majority (93 per cent) of large whole-halo spin flips (θ≥ 45°) coincide with small mass changes, not major mergers. The spin vector of the inner halo experiences much more frequent flips than the halo as a whole. Over their entire lifetimes (i.e. after a halo acquires half of its final mass), more than 10 per cent of haloes experience a flip of at least 45° in the spin of the entire halo and nearly 60 per cent experience a flip this large in the inner halo. These numbers are reduced to 9 per cent for the whole halo and 47 per cent for the inner halo when we consider only haloes with no major mergers after formation. Our analysis suggests that spin flips (whose effects are not currently included in galaxy formation models) could be an important factor in the morphological transformation of disc galaxies.