Objective To determine aflatoxin B_1, B_2, G_1 and G_2 in Dieda Pills by UPLC/MS/MS and evaluate the safety. Methods The product was analyzed by UPLC/MS/MS using a C_(18) column(2.1 mmx100 mm, 1.7 μm) with methanol-10 mmol ammonium acetate as mobile phase for gradient elution. Electrospray ion source(ESI∼+), multi-reaction monitoring(MRM) mode. The 76 batches of sample from nation-wide market were detected by the method. Results Linear relationships were obtained within the range of 0.06∼10 ng·mL∼(-1) for aflatoxin B_1 and G_1, and 0.02∼3 ng·mL∼(-1) for aflatoxin B_2 and G_2. The recoveries of aflatoxin B_1, B_2, G_1 and G_2 were 98.2%, 100.9%, 88.2% and 94.8%, resp., with all the RSD below 5.0%. Aflatoxin G_1 and B_1 were detected in 3 batches of samples from the same company among 76 batches, but the content were not exceed the limit. The other 73 batches were not detected. Conclusion The developed method was convenient and accurate, and the results showed that the risk of aflatoxin contamination was low.