We developed a microreactor with porous copper fibers for synthesizing nitrogen-doped carbon dots (N-CDs) with a high stability and photoluminescence (PL) quantum yield (QY). By optimizing synthesis conditions, including the reaction temperature, flow rate, ethylenediamine dosage, and porosity of copper fibers, the N-CDs with a high PL QY of 73% were achieved. The PL QY of N-CDs was two times higher with copper fibers than without. The interrelations between the copper fibers with different porosities and the N-CDs were investigated using X-ray photoelectron spectroscopy (XPS) and Fourier Transform infrared spectroscopy (FTIR). The results demonstrate that the elemental contents and surface functional groups of N-CDs are significantly influenced by the porosity of copper fibers. The N-CDs can be used to effectively and selectively detect Hg2+ ions with a good linear response in the 0~50 μM Hg2+ ions concentration range, and the lowest limit of detection (LOD) is 2.54 nM, suggesting that the N-CDs have great potential for applications in the fields of environmental and hazard detection. Further studies reveal that the different d orb ... mehrital energy levels of Hg2+ compared to those of other metal ions can affect the efficiency of electron transfer and thereby result in their different response in fluorescence quenching towards N-CDs.