We present a novel framework that provides an explanation to the long-standing excess of electron-like events in the MiniBooNE experiment at Fermilab. We suggest a new dark sector containing a dark neutrino and a dark gauge boson, both with masses between a few tens and a few hundreds of MeV. Dark neutrinos are produced via neutrino-nucleus scattering, followed by their decay to the dark gauge boson, which in turn gives rise to electronlike events. This mechanism provides an excellent fit to MiniBooNE energy spectra and angular distributions. We propose here to use this fact to connect the generation of neutrino masses to a light dark sector, charged under a new U(1)D dark gauge symmetry. We introduce the minimal number of dark fields to obtain an anomaly free theory with the spontaneous breaking of the dark symmetry and obtain automatically the inverse seesaw Lagrangian. In addition, the so-called μ-term of the inverse seesaw is dynamically generated and technically natural in this framework.