We report the discovery of a low-mass stellar companion around the young Herbig Be star MWC 297. We performed multi-epoch high-contrast imaging in the near-infrared with the Very Large Telescope (VLT)/Spectro-Polarimetric High-contrast Exoplanet REsearch (SPHERE) instrument. The companion is found at a projected separation of 244.7 ± 13.2 au and a position angle of 176.4 ± 0.1 deg. The large separation supports formation via gravitational instability. From the spectrum, we estimate a mass of 0.1-0.5 M o˙, the range conveying uncertainties in the extinction of the companion and in evolutionary models at young ages. The orbit coincides with a gap in the dust disk inferred from the spectral energy distribution. The young age (≲1 Myr) and mass ratio with the central star (∼0.01) makes the companion comparable to PDS 70 b, suggesting a relation between formation scenarios and disk dynamics.