Response to exterior stimulants, such as light and pH and also self-healing behavior are the major specifications of smart nanocomposites. This project aims to synthesise various weight percentages of smart fluorescent hydrogel nanocomposites using natural and bio-friendly materials including polyvinyl alcohol (PVA), corn starch (CS), aloe vera (AV) and g-C3N4QDs (PSA/CN). Graphitic carbon nitride quantum dots (g-C3N4QDs or CN) were synthesised by way of pyrolysis of the urea and citric acid (CA) blend with 18:1 weight proportion employing microwave-supported procedure. Next, synthesis and properties of the prepared nanocomposites were verified by means of microscopic and electroscopic methods. The strong absorption peaks registered at 230, 290 and 390 nm confirmed UV absorption ability of the synthesised PSA/CN nanocomposites. In response to 390 nm exciting wavelength, these nanocomposites emitted green fluorescence (FL) at 505–510 nm. Adding CN (0.25 wt% and 0.5 wt%) to the hydrogel matrix bred a growth in thermal stability of the resultant nanocomposites. Loading diverse weight percentages of CN into hydrogel matrix led the rheological features of the hydrogel nanocomposites to improve. Studies on pH-responsive and rheological analyses approved self-healing behavior of the PSA/CN nanocomposites against damages.