All-optical control of nonlinear photonic processes in nanomaterials is of significant interest from a fundamental viewpoint and with regard to applications ranging from ultrafast data processing to spectroscopy and quantum technology. However, these applications rely on a high degree of control over the nonlinear response, which still remains elusive. Here, we demonstrate giant and broadband all-optical ultrafast modulation of second-harmonic generation (SHG) in monolayer transition-metal dichalcogenides mediated by the modified excitonic oscillation strength produced upon optical pumping. We reveal a dominant role of dark excitons to enhance SHG by up to a factor of ∼386 at room temperature, 2 orders of magnitude larger than the current state-of-the-art all-optical modulation results. The amplitude and sign of the observed SHG modulation can be adjusted over a broad spectral range spanning a few electronvolts with ultrafast response down to the sub-picosecond scale via different carrier dynamics. Our results not only introduce an efficient method to study intriguing exciton dynamics, but also reveal a new mechanism involving dark excitons to regulate all-optical nonlinear photonics.