With the increase of people's attention to nutrition and health, food quality and safety have also become the focus of people's daily attention, among which mercury and its compounds are widely distributed in nature, with high volatility, high toxicity and harmful accumulation. In this paper, the first method of atomic fluorescence spectroscopy in GB5009.17-2021 "National Food Safety Standard - Determination of Total Mercury and Organic Mercury in Food" was comprehensively analyzed in the detection of total mercury in food, and the key points of sample pretreatment, the on-machine detection process and the detection experiment were comprehensively analyzed. The analysis of key points of pretreatment mainly includes: sample weighing, cleaning and use of detection instruments, amount of acid in microwave digestion process, optimization and setting of microwave digestion program, and analysis and research on the elimination method of excess nitric acid after microwave digestion is completed. The analysis of the key parameters of the atomic fluorescence photometer of the detection equipment during the sample testing on the machine includes: the setting and optimization of the instrument parameters, the daily maintenance method of the key components of the instrument, etc.; Through the analysis and study of all aspects of the entire detection process, the main factors affecting the accuracy of the detection results are identified for improvement and solidification implementation, so as to more effectively improve the accuracy of the measurement results.