The electronic bandgap of a material is often fixed after fabrication. The capability to realize on-demand and nonvolatile control over the bandgap will unlock exciting opportunities for adaptive devices with enhanced functionalities and efficiency. We introduce a general design principle for on-demand and nonvolatile control of bandgap values, which utilizes reversible sliding-induced polarization driven by an external electric field to modulate the irreversible background polarization in asymmetric two-dimensional (2D) multilayers. The structural asymmetry can be conveniently achieved in homobilayers of Janus monolayers and heterobilayers of nonpolar monolayers, making the design principle applicable to a broad range of 2D materials. We demonstrate the versatility of this design principle using experimentally synthesized Janus metal dichalcogenide multilayers as examples. Our first-principles calculations show that the bandgap modulation can reach up to 0.3 eV and even support a semimetal-to-semiconductor transition. By integrating a ferroelectric monolayer represented by 1T″′-MoS2 into a bilayer, we show that the combination of intrinsic ferroelectricity and sliding ferroelectricity leads to multi-bandgap systems coupled to multi-step polarization switching. The sliding-reversible bandgap modulation offers an avenue to dynamically adjust the optical, thermal, and electronic properties of 2D materials through mechanical and electrical stimuli.