We explore the effect of magnetic fields on the vertical distribution and multiphase structure of the supernova-driven interstellar medium in simulations that admit dynamo action. As the magnetic field is amplified to become dynamically significant, gas becomes cooler and its distribution in the disc becomes more homogeneous. We attribute this to magnetic quenching of vertical velocity, which leads to a decrease in the cooling length of hot gas. A non-monotonic vertical distribution of the large-scale magnetic field strength, with the maximum at |z| ≈ 300 pc causes a downward pressure gradient below the maximum which acts against outflow driven by SN explosions, while it provides pressure support above the maximum.