In Kaluza-Klein electromagnetism it is natural to associate modified gravity with strong electromagnetic fields. Hence, in this paper we investigate the combined effects of a strong magnetic field and perturbative f(R) gravity on the structure of neutron stars. The effect of an interior strong magnetic field of about 10(17-18) G on the equation of state is derived in the context of a quantum hadrodynamics (QHD) equation of state (EoS) including effects of the magnetic pressure and energy along with occupied Landau levels. Adopting a random orientation of interior field domains, we solve the modified spherically symmetric hydrostatic equilibrium equations derived for a gravity model with f(R) = R + alpha R-2. Effects of both the finite magnetic field and the modified gravity are detailed for various values of the magnetic field and the perturbation parameter a along with a discussion of their physical implications. We show that there exists a parameter space of the modified gravity and the magnetic field strength, in which even a soft equation of state can accommodate a large (>2 M-circle dot) maximum neutron star mass.