Numerical simulations that assume realistic core-fluid viscosities have been unsuccessful in fully reproducing the unique characteristics of the Earth’s geomagnetic field. An evaluation of boundary conditions suggests that the prescription of a uniform heat flux at the core’s surface could generate a more Earth-like magnetic field. The Earth’s main magnetic field is thought to be generated by motions in the planet’s fluid outer core, which lead to an effect similar to that of a dynamo1,2,3. Recent high-resolution numerical simulations produce only a non-dipolar4 or a dipolar but comparatively weak magnetic field5,6 unlike that of the Earth. Older models that did generate a strong, Earth-like field needed to use unrealistically high viscosities for the core fluid7,8,9,10. Common to most of the models is the assumption of a laterally uniform core-surface temperature. Here we use a low-viscosity geodynamo model to evaluate the effect of a different and more realistic boundary condition—a uniform heat flux at the surface of the core—on the simulation of an Earth-like magnetic field. Our results show that when the surface temperature is laterally uniform, only a weak magnetic field is generated because planetary-scale fluid circulations are suppressed. In contrast, a laterally uniform heat flux at the core’s surface leads to large-scale convective flows, and a comparatively strong dipole-type magnetic field. Contrary to previous work11,12, we suggest that thermal conditions at the core surface have a strong effect on low-viscosity geodynamo models.