We study the hadronic light-by-light scattering contribution to the energy interval 1S-2S in muonium. Various amplitudes of interaction of a muon and an electron are constructed, in which the effect of hadronic scattering of light by light is determined using the transition form factor of two photons into a meson. Their contributions to the particle interaction operator in the case of S states are obtained in integral form, and their contributions to the energy spectrum are obtained in numerical form. The contributions of pseudoscalar, scalar, and axial vector mesons are taken into account.