Designing multifunctional and unconventional devices can be accomplished by synergistic integration of several external features on a memory device. In the current study, a hybrid structure of nitrogen-doped carbon quantum dots (NCQDs) decorated on molybdenum disulfide (MoS 2 ) has been fabricated over a flexible Kapton substrate. The variable resistive-switching (RS) behavior of the Ag/NCQDs-MoS 2 /Ag-nanostructured device has been thoroughly examined under both dark and UV-light illumination. The device shows an impressive performance, exhibiting gradual resistive-switching (GRS) and abrupt resistiveswitching (ARS) behavior with notable endurance (2200 cycles) and remarkable data retention (2500 s) properties without any deterioration. A conceptual model has been introduced to offer a profound and insightful understanding of the device's ARS and GRS behavior. In ambient conditions, the device ability of bipolar ARS with two resistance states, namely, a high resistance state (HRS) and a low resistance state (LRS), could be attributed to the creation and disruption of an Ag metallic filament between the top and bottom electrodes. However, when the device was subjected to UV irradiation, an interesting ARS as well as GRS behavior with distinct SET and RESET voltages was observed. This behavior could be associated with forming an additional ionic filament before forming an Ag metallic filament. The growth of the ionic filament was influenced by UV irradiation via trapping/detrapping of carriers in generated nitride−sulfide-related vacancies. In addition, the device's flexibility was assessed by subjecting it to various bending degrees and bending cycles to mimic real-life scenarios, where the device may experience multiple forms of mechanical deformation. Therefore, this optically tuned and flexible RS device has the potential to spark the advancement of futuristic resistive random-access memory applications in flexible optoelectronics.