ABSTRACT We explore the redshift evolution of the radio luminosity function (RLF) of star-forming galaxies using galform, a semi-analytic model of galaxy formation and a dynamo model of the magnetic field evolving in a galaxy. Assuming energy equipartition between the magnetic field and cosmic rays, we derive the synchrotron luminosity of each sample galaxy. In a model where the turbulent speed is correlated with the star formation rate, the RLF is in fair agreement with observations in the redshift range 0 ≤ z ≤ 2. At larger redshifts, the structure of galaxies, their interstellar matter, and turbulence appear to be rather different from those at z ≲ 2, so that the turbulence and magnetic field models applicable at low redshifts become inadequate. The strong redshift evolution of the RLF at 0 ≤ z ≤ 2 can be attributed to an increased number, at high redshift, of galaxies with large disc volumes and strong magnetic fields. On the other hand, in models where the turbulent speed is a constant or an explicit function of z, the observed redshift evolution of the RLF is poorly captured. The evolution of the interstellar turbulence and outflow parameters appear to be major (but not the only) drivers of the RLF changes. We find that both the small- and large-scale magnetic fields contribute to the RLF but the small-scale field dominates at high redshifts. Polarization observations will therefore be important to distinguish these two components and understand better the evolution of galaxies and their non-thermal constituents.