Food safety is a widespread global concern with the emergence of foodborne diseases. Thus, establishing accurate and sensitive detection methods of harmful contaminants in different food matrices is essential to address and prevent the associated health risks. Among various analytical tools, mass spectrometry (MS) can quantify multiple impurities simultaneously due to high resolution and accuracy and can achieve non-target profiling of unknown pollutants in food. Therefore, MS has been widely used for determination of hazardous contaminants [e.g., mycotoxin, pesticide and veterinary drug residues, polychlorinated biphenyls (PCBs), dioxins, acrylamide, perfluorinated compounds (PFCs) and p-Phenylenediamine compounds (PPDs) in food samples]. This work summarizes MS applications in detecting harmful contaminants in food matrices, discusses advantages of MS for food safety study, and provides a perspective on future directions of MS development in food research. With the persistent occurrence of novel contaminants, MS will play a more and more critical role in food analysis.