Organic effluents disposed of by industrial plants have created a serious impact on the availability of potable water, disturbed environmental sanity, and hampered the natural thriving of aquatic animals. In particular, the concentrations of methyl blue (MB) dye in different water bodies has lately risen to an alarming level. In the present study, the adsorption performance of metal ion-doped heptazine-based graphitic carbon nitride (g-C3N4) quantum dots towards MB was investigated using first-principles calculations. The computed electronic properties associated with the MB∙∙∙g-C3N4 and MB∙∙∙M+−g-C3N4 clusters in the aqueous medium indicated that doping the carbon nitride sheets with lithium ions exhibits the smallest HOMO-LUMO gap and the highest charge potential, as compared to the potassium and sodium counterparts. The interaction in MB∙∙∙Li+-g-C3N4 was shown to become weaker in acidic media. The effective adsorption of the metal-doped nanosheets was predicted to increase in the order K+-g-C3N4 < Na+-g-C3N4 < Li+-g-C3N4. Protonation of the nanoclusters resulted in a stronger attraction of the dye molecule while the same order for the non-protonated analogs is retained, suggesting that electrostatic attraction is the key factor that controls the adsorption behavior in such systems.