Chemical warfare agents (CWAs), including hydrogen cyanide (AC), 2-[fluoro(methyl)phosphoryl]oxypropane (GB), 3-[fluoro(methyl)phosphoryl]oxy-2,2-dimethylbutane (GD), ethyl S-(2-diisopropylaminoethyl) methylphosphonothioate (VX), and di-2-chloroethyl sulfide (HD), pose a great threat to public safety; therefore, it is important to develop sensing technology for CWAs. Herein, a sensor array consisting of 24 metal oxide semiconductor (MOS)-based MEMS sensors with good gas sensing performance, a simple device structure (0.9 mm x 0.9 mm), and low power consumption (<10 mW on average) was developed. The experimental results show that there are always several sensors among the 24 sensors that show good sensing performance in relation to each CWA, such as a relatively significant response, a broad detection range (AC: 5.8-89 ppm; GB: 0.04-0.47 ppm; GD: 0.06-4.7 ppm; VX: 9.978 x 10-4-1.101 x 10-3; HD: 0.61-4.9 ppm), and a low detection limit that is lower than the immediately dangerous for life and health (IDLH) level of the five CWAs. This indicates that these sensors can meet the needs for qualitative detection and can provide an early warning regarding low concentrations of CWAs. In addition, features were extracted from the initial kinetic characteristics and dynamic change characteristics of the sensing response. Finally, principal component analysis (PCA) and machine learning algorithms were applied for CWA classification. The obtained PCA plots showed significant differences between groups, and the narrow neural network among the machine learning algorithms achieves a prediction accuracy of nearly 100.0%. In summary, the proposed MOS-based MEMS sensor array driven by pattern recognition algorithms can be integrated into portable devices, showing great potential and practical applications in the rapid, in situ, and on-site detection and identification of CWAs.