We investigate the potential of type II supernovae (SNe) to constrain axion-like particles (ALPs) coupled simultaneously to nucleons and electrons. ALPs coupled to nucleons can be efficiently produced in the SN core via nucleon-nucleon bremsstrahlung and, for a wide range of parameters, leave the SN unhindered, producing a large ALP flux. For masses exceeding 1 MeV, these ALPs would decay into electron-positron pairs, generating a positron flux. In the case of Galactic SNe, the annihilation of the created positrons with the electrons present in the Galaxy would contribute to the 511 keV annihilation line. Using the SPI (SPectrometer on INTEGRAL) observation of this line, allows us to exclude a wide range of the axion-electron coupling, $10^{-19} lesssim g_{ae} lesssim 10^{-11}$, for $g_{ap}sim 10^{-9}$. Additionally, ALPs from extra-galactic SNe decaying into electron-positron pairs would yield a contribution to the cosmic X-ray background. In this case, we constrain the ALP-electron coupling down to $g_{ae} sim 10^{-20}$.