Magnetic interactions between a protostar and its accretion disc can induce warping in the disc and produce secular changes in the stellar spin direction, so that the spin axis may not always be perpendicular to the disc. This may help to explain the 7° misalignment between the ecliptic plane of the Solar system and the Sun’s equatorial plane as well as play a role in producing the recently observed spin–orbit misalignment in a number of exoplanetary systems. We study the dynamics of warped protoplanetary discs under the combined effects of magnetic warping/precession torques and internal stresses in the disc, including viscous damping of warps and propagation of bending waves. We show that when the outer disc axis is misaligned with the stellar spin axis, the disc evolves towards a warped steady state on a time-scale that depends on the disc viscosity or the bending wave propagation speed, but in all cases is much shorter than the time-scale for the spin evolution (of the order of a million years). Moreover, for the most likely physical parameters characterizing magnetic protostars, circumstellar discs and their interactions, the steady-state disc, averaged over the stellar rotation period, has a rather small warp such that the whole disc lies approximately in a single plane determined by the outer disc boundary conditions, although more extreme parameters may give rise to larger disc warps. In agreement with our recent analysis based on flat discs, we find that the back-reaction magnetic torques of the slightly warped disc on the star can either align the stellar spin axis with the disc axis or push it towards misalignment, depending on the parameters of the star–disc system. This implies that newly formed planetary systems may have a range of inclination angles between the stellar spin axis and the orbital angular momentum axis of the planetary orbits.