We investigate the effect of an external shear flow on the buoyant instabilities inherent in the directional solidification of a dendritic mushy layer. In the presence of an external shear flow, perturbations of the mush–liquid interface lead to perturbed flow in the bulk fluid that create pressure variations along the mush–liquid interface. These pressure variations drive flow in the mushy layer. A numerical analysis of the stability of the system provides the critical porous-medium Rayleigh number as a function of both the external flow speed and the wavenumber of the interfacial perturbations. In the limit of zero external flow we recover the so-called boundary and mushy layer modes of buoyancy-driven convection first established by Worster (J. Fluid Mech., vol. 237, 1992b, p. 649). We find that the application of an external flow can significantly reduce the stability of both the boundary and mushy layer modes. The resultant forced mushy layer mode gives rise to the formation of channels of reduced solid fraction perpendicular to the applied flow that are distinct from the planform found in the absence of an external flow. The stability of the system is examined as a function of the principal thermodynamic and dynamic parameters, and the results are applied to the solidification of sea ice in the presence of vigorous oceanic flow.