In this study, a rapid screening method for elemental impurities in pharmaceutical products has been established by portable energy dispersive X-ray fluorescence (EDXRF) spectroscopy combined with the efficient fundamental parameter method. The proposed method has been used for the screening of 22 elemental impurities (i.e., Cd, Pb, As, Hg, Co, V, Ni, Tl, Au, Pd, Ir, Os, Rh, Ru, Se, Ag, Pt, Sb, Mo, Cu, Sn, and Cr) in the International Conference on Harmonization (ICH) Q3D guideline. The verification of results could meet the acceptance criteria for accuracy, precision and linearity in the United States Pharmacopoeia 〈233〉. On the other hand, the limit of quantitation of the proposed EDXRF method for the screening of 22 elemental impurities in pharmaceutical products could meet the concentration limits of each element at 10 g maximum daily intake based on the established permitted daily exposure to oral drugs in the ICH Q3D guideline. Our findings open up new possibilities in the rapid screening of pharmaceutical products for the detection of elemental impurities by EDXRF, which can be expected to provide a novel, nondestructive, high-throughput, portable, and sensitive platform for the process control of elemental impurities to ensure the quality and safety of drugs.