The role of uniform shear in bioconvective instability in a shallow suspension of swimming gyrotactic cells is studied using linear stability analysis. The shear is introduced by applying a plane Couette flow, and it significantly disturbs gravitaxis of the cell. The unstably stratified basic state of the cell concentration is gradually relieved as the shear rate is increased, and it even becomes stably stratified at very large shear rates. Stability of the basic state is significantly changed. The instability at high wavenumbers is drastically damped out with the shear rate, while that at low wavenumbers is destabilized. However, at very large shear rates, the latter is also suppressed. The most unstable mode is found as a pair of streamwise uniform rolls aligned with the shear, analogous to Rayleigh–Bénard convection in plane Couette flow. To understand these findings, the physical mechanism of the bioconvective instability is reexamined with several sets of numerical experiments. It is shown that the bioconvective instability in a shallow suspension originates from three different physical processes: gravitational overturning, gyrotaxis of the cell and negative cross-diffusion flux. The first mechanism is found to rule the behaviour of low-wavenumber instability whereas the last two mechanisms are mainly associated with high-wavenumber instability. With the increase of the shear rate, the former is enhanced, thereby leading to destabilization at low wavenumbers, whereas the latter two mechanisms are significantly suppressed. For streamwise varying perturbations, shear with sufficiently large rates is also found to play a stabilizing role as in Rayleigh–Bénard convection. However, at small shear rates, it destabilizes these perturbations through the mechanism of overstability discussed by Hill, Pedley and Kessler (J. Fluid Mech., vol. 208, 1989, pp. 509–543). Finally, the present findings are compared with a recent experiment by Croze, Ashraf and Bees (Phys. Biol., vol. 7, 2010, 046001) and they are in qualitative agreement.