Context. It has been suggested that the bow shocks of runaway stars are sources of high-energy gamma rays (E > 100 MeV). Theoretical models predicting high-energy gamma-ray emission from these sources were followed by the first detection of non-thermal radio emission from the bow shock of BD+43$^deg$ 3654 and non-thermal X-ray emission from the bow shock of AE Aurigae. Aims. We perform the first systematic search for MeV and GeV emission from 27 bow shocks of runaway stars using data collected by the Large Area Telescope (LAT) onboard the Fermi Gamma-ray Space Telescope (Fermi). Methods. We analysed 57 months of Fermi-LAT data at the positions of 27 bow shocks of runaway stars extracted from the Extensive stellar BOw Shock Survey catalogue (E-BOSS). A likelihood analysis was performed to search for gamma-ray emission that is not compatible with diffuse background or emission from neighbouring sources and that could be associated with the bow shocks. Results. None of the bow shock candidates is detected significantly in the Fermi-LAT energy range. We therefore present upper limits on the high-energy emission in the energy range from 100 MeV to 300 GeV for 27 bow shocks of runaway stars in four energy bands. For the three cases where models of the high-energy emission are published we compare our upper limits to the modelled spectra. Our limits exclude the model predictions for Zeta Ophiuchi by a factor $approx$ 5.