An environment friendly, economic and maneuverable hydrothermal method was proposed for fabrication of nitrogen and chlorine co-doped carbon quantum dots (N,Cl-CQDs). D-Glucosamine hydrochloride as the only precursor offered source of carbon, nitrogen and chlorine. As a consequent N,Cl-CQDs can emit blue luminescence and detect Fe3+ by fluorescence response with high selectivity and sensitivity. There is a linear semilogarithmic correlation between the quenching efficiency F0∕F and the concentration of Fe3+ with a detection limit of 0.167 μM. The N,Cl-CQDs exhibit a high quantum yield of 16.8% along with the fluorescence lifetime of 2.2ns. It is worth noting that the prepared N,Cl-CQDs show excellent biocompatibility and they are promising materials for sensing and biology.