We develop a quantum master equation (QME) approach to investigate the electroluminesence (EL) of molecules confined between metallic electrodes and coupled to quantum plasmonic modes. Within our general state-based framework, we describe electronic tunneling, vibrational damping, environmental dephasing, and the quantum coherent dynamics of coupled quantum electromagnetic field modes. As an example, we calculate the STM-induced spontaneous emission of a tetraphenylporphyrin (TPP) molecule coupled to a nanocavity plasmon. In the weak molecular exciton-plasmon coupling regime we find excellent agreement with experiments, including above-threshold hot luminescence, an effect not described by previous semiclassical calculations. In the strong coupling regime, we analyze the spectral features indicative of the formation of plexcitonic states.