The role of magnetic fields in the multi-phase interstellar medium (ISM) is explored using magnetohydrodynamic (MHD) simulations that include energy injection by supernova (SN) explosions and allow for dynamo action. Apart from providing additional pressure support of the gas layer, magnetic fields reduce the density contrast between the warm and hot gas phases and quench galactic outflows. A dynamo-generated, self-consistent large-scale magnetic field affects the ISM differently from an artificially imposed, unidirectional magnetic field.