(Abridged) A large fraction of the gas in galactic haloes has temperatures between 10^4.5 and 10^7 K. At these temperatures, cooling is dominated by metal-line emission if the metallicity Z>~0.1 Zsun. We explore the detectability of several lines using large cosmological, hydrodynamical simulations. We stack surface brightness maps centred on galaxies to calculate the expected mean surface brightness profiles for different halo masses. Assuming a detection limit of 10^-1 photon s^-1 cm^-2 sr^-1, proposed X-ray telescopes can detect O VIII emission from z=0.125 out to 80% of the virial radius (Rvir) of groups and clusters and out to 0.4Rvir for haloes with masses Mhalo=10^12-13 Msun. Emission lines from C VI, N VII, O VII, and Ne X can be detected out to smaller radii, 0.1-0.5Rvir. With a detection limit of 10^-20 erg s^-1 cm^-2 arcsec^-2, future UV telescopes can detect C III emission out to 0.2-0.6Rvir at z=0.25. C IV, O VI, Si III, and Si IV can be seen out to 0.1-0.2Rvir for Mhalo>10^12 Msun. Optical HI H-alpha emission is comparable in strength to C III emission. At z=3 it may be possible to observe C III out to 0.2-0.3Rvir and other rest-frame UV lines out to ~0.1Rvir for Mhalo>10^11 Msun with upcoming optical instruments. Metal-line emission is typically biased towards high density and metallicity and towards the temperature at which the emissivity curve of the corresponding metal line peaks. The bias is similar for the different soft X-ray lines considered, whereas it varies strongly between different UV lines. Active galactic nucleus (AGN) feedback can change the inner surface brightness profiles significantly, but it generally does not change the radius out to which the emission can be observed. Metal-line emission is a promising probe of the warm and hot, enriched gas around galaxies and provides a unique window into the interactions between galaxies and their gaseous haloes.