The invention discloses a method for detecting salmonella and staphylococcus aureus in food simultaneously. The method includes the following steps: 1), diluting a to-be-tested food sample according to GB4789 to obtain sample homogenate of 1:10, adding 50-65wt% of nitrilotriacetic acid solution into the sample homogenate according to the volume ratio of the sample homogenate to the nitrilotriacetic acid solution being (5-7):1, vibrating the mixture, adding phosphate buffer solution or 0.05% tween-20 contained phosphate buffer solution, performing centrifugal layering, and discarding an upper layer; 2), mixing a sample obtained after processing of the step 1) with immunomagnetic beads, vibrating the mixture, subjecting the mixture to standing and layering on a magnetic frame, discarding an upper layer, and washing a lower layer of the sample, wherein the immunomagnetic beads are obtained by modifying salmonella and staphylococcus aureus antibodies, which are labeled by magnetic bead coupled biotin, by streptavidin; 3), adding the phosphate buffer solution to the washed sample, vibrating the mixture, applying the mixture to an LB plate, and performing cultivation and observation. The method is simple and convenient to operate, accurate, efficient and low in cost, two target bacteria are enriched, and detection time can be shorten from 72h to 25h.