In this paper, a one-step hydrothermal treatment was employed for the synthesis of fluorescent carbon dots (CDs) via Gac fruit. According to the results of the analysis, the average diameter of CDs was 3.5 +/- 1.1 nm. The use of CDs as sensing probes has shown selectivity and sensitivity for the detection of Fe3+ ions, as evidenced by the quenching of the photoluminescence intensity and the achievement of a detection limit of 4.7 mu M. The FTIR spectrum elucidated the functional groups present on the surface of the carbon core after the thermal reaction, including O-H, C=O, C=C, C-H, and C-OH bonds. A plausible explanation for the quenching is the charge-transfer transitions between CDs and Fe3+ ions, owing to interaction of Fe3+ ions with oxygen-containing functional groups on the CDs. The fluorescence intensities of the CDs solution were also measured in the co-presence of Fe3+ ions, demonstrating the anti-interference capability of Fe3+ in comparison to other metal ions. Furthermore, an experiment was carried out to explore the potential utility of the acquired CDs for cell imaging. In particular, onion epidermal cells displayed various color emissions when using CDs as a dye. Considering the research results, there is merit in directing attention toward enhancing the quality of CDs structures for applications in real water pollution and biological contexts.