The invention discloses a method for rapidly screening 40 prohibited antibiotics in cosmetics. The method comprises the following steps: (1) manufacturing an in-situ spray ionization device: producing a borosilicate glass capillary and assembling an in-situ spray ionization device; (2) ion mobility spectrometry detection: dipping a metal micro electrode into a cosmetic sample, then inserting the metal micro electrode into a borosilicate glass capillary, which is filled with methanol in advance, placing the capillary on the front end of the electrospray ionization (ESI) injection port of an ion mobility spectrometry instrument, setting the parameters of the ion mobility spectrometry instrument, ionizing the sample, separating the ionized sample in a drift tube, detecting the sample by a Faraday cup detector to obtain a corresponding experiment map. If the sample detected by the ion mobility spectrometry contains prohibited antibiotics, the sample can be further detected by high performance liquid chromatography-mass spectrum (HPLC-MS) or mass spectrum. The provided method is accurate and reliable, on the basis that the detected data is precise, the detection cost is largely reduced, and the detection efficiency is improved.