The deformation and breakup of droplets in airflows is important in spray and atomisation processes, but the shear effect in non-uniform airflow is rarely reported. In this study, the deformation and breakup of droplets in a shear flow of air is investigated experimentally using high-speed imaging, digital image processing and particle image velocimetry. The results show that in airflow with a strong shear effect, the droplet breakup exhibits unique features due to the uplift and stretching produced by the interaction between the deformed droplet and the shear layer. The breakup process can be divided into three stages according to the droplet morphology and the breakup mechanism, namely the sheet breakup, the swing breakup and the rim breakup stages. Theoretical analysis reveals that the swing breakup is governed by the transverse Rayleigh–Taylor instability. A regime map of the droplet breakup is produced, and the transitions between different regimes are obtained theoretically. The stretching liquid film during the droplet deformation and the fragment size distribution after droplet breakup are analysed quantitatively, and the results show that they are determined by the competition of breakup at different stages affected by the shear. Finally, the effect of the droplet viscosity is investigated, and the viscosity inhibits the droplet breakup in a strong shear airflow.