This study aimed to develop non-metal elements for doping carbon quantum dots (CQDs) with nitrogen and sulfur (N, S-CQDs), which loaded inside hexagonal mesoporous silica (HMS) in order to effectively remove methylene blue dye (MB) from an aqueous solution. The histidine and cysteine amino acids were used as the source for synthesis N, S-CQDs through the hydrothermal method. Morphology and structure of the N, S-CQDs, and adsorbent (N, S-CQDs/HMS) were characterized by using different microscopic and spectroscopic techniques. The adsorption parameters such as adsorbent dosage (0.25–1 g/L), pH (2–10), contact time (15–75 min), and initial MB dye concentration (20–300 mg/L) were investigated. The maximum adsorption capacity and removal efficiency of MB were determined at 370.4 mg/g and 97%, respectively, under optimum conditions at 303 K. The adsorption isotherm studies were fitted with the Freundlich isotherm equation, and the dye removal kinetics of the adsorbent followed the pseudo-second-order model. Thermodynamic studies showed that the adsorption process had exothermic and spontaneous behavior. The removal of MB next to the Rhodamine B and Reactive Black 5 dyes indicated that the N, S-CQDs/HMS had excellent selective behavior for MB absorption. This prepared adsorbent could be well recycled with suitable activity after four repeated adsorption–desorption cycles. Results revealed that the porous characters, surface area, charge properties, reduction in the bandgap, and quantum yield of the N, S-CQDs/HMS were essential factors that affected dye adsorption.