In this research, carbon quantum dots (CQDs) were synthesized by using pistachio as precursor for the first time with a hydrothermal method in aqueous media. Synthesized QDs were characterized by different analyses such as X-ray diffraction (XRD), transmission electron microscopy (TEM), energy dispersive X-ray spectroscopy (EDS), field emission scanning electron microscopy (FESEM), Fourier transform-infrared spectroscopy (FT-IR), BET, Zeta potential, Raman, photoluminescence (PL) and UV-visible (UV-vis) spectroscopies. The Raman spectroscopy results showed 3.54 value for G/D ratio and this result confirmed that synthesized CQDs are composed of graphitic crystalline structure. Zeta potential measurement of CQDs showed that CQDs had negative charge in their surface and it confirmed a great stability for CQDs. CQDs had blue photo emission with a broad PL peak between 300 to 600 nm with quantum yield of 12%. TEM images showed that synthesized CQDs are spherical with a size of about 7 nm. Heavy metal sensitivity of CQDs were investigated by different heavy metal ions in water media and results showed that PL intensity of CQDs in presence of Co2+ ions decreased and showed CQDs had sensitivity versus Co2+ ions. Photocatalyst activity of CQDs were investigated by different dyes under visible and UV illuminations. The obtained results showed that methylene blue had better degradation with CQDs than methylene orange and rhodamine b. The radical scavenger's results obtained that electrons play the key role in photocatalyst process of CQDs with methylene blue under UV irradiation.