The invention relates to a method for measuring the residual quantity of paraquat and diquat in food. During pretreatment on a sample, paraquat and diquat in a food sample are extracted by a methanol solution, the extract liquid is purified by C18 and PSA dispersive solid-phase extraction agents, and finally, qualitative and quantitative measurement on the residual paraquat and diquat in the food is achieved through the precise mass number of compound ions with the combination of high performance liquid chromatography-quadrupole rod flight time tandem mass spectrum. The average recycling rate of paraquat is 80.6%-96.8%, the relative standard deviation of paraquat is 3.9%-7.1%, the limit of quantitation of paraquat is 10 microgram / kg, the recycling rate of diquat is 80.8%-97.3%, the relative standard deviation of diquat is 3.5%-7.8%, and the limit of quantitation of diquat is 10 microgram / kg. The method can effectively alleviate matrix interference to residual detection on paraquat and diquat in food, has the advantages of simplicity and convenience in operation, rapidness, accuracy, high sensitivity and good repeatability, and is supplement and improvement on a conventional QuEChERS method.