Abstract A portable mass spectrometer with an electron cyclotron resonance ion source (miniECRIS-MS) was developed. It was used for in situ monitoring of trace amounts of chemical warfare agents (CWAs) in atmospheric air. Instrumental construction and parameters were optimized to realize a fast response, high sensitivity, and a small body size. Three types of CWAs, i.e., phosgene, mustard gas, and hydrogen cyanide were examined to check if the mass spectrometer was able to detect characteristic elements and atomic groups. From the results, it was found that CWAs were effectively ionized in the miniECRIS-MS, and their specific signals could be discerned over the background signals of air. In phosgene, the signals of the 35Cl+ and 37Cl+ ions were clearly observed with high dose–response relationships in the parts-per-billion level, which could lead to the quantitative on-site analysis of CWAs. A parts-per-million level of mustard gas, which was far lower than its lethal dosage (LCt50), was successfully detected with a high signal-stability of the plasma ion source. It was also found that the chemical forms of CWAs ionized in the plasma, i.e., monoatomic ions, fragment ions, and molecular ions, could be detected, thereby enabling the effective identification of the target CWAs. Despite the disadvantages associated with miniaturization, the overall performance (sensitivity and response time) of the miniECRIS-MS in detecting CWAs exceeded those of sector-type ECRIS-MS, showing its potential for on-site detection in the future.