The rapid, discriminative, and portable detection of highly toxic chemical warfare agents is extremely important for response to public security emergencies but remains a challenge. One plausible solution involves the integration of porous molecular traps onto a photoelectrochemical (PEC) sensor. Here, a fast and facile protocol is developed to fabricate sub‐1 nm AgNPs encapsulated hydrogen‐bonded organic framework (HOF) nanocomposite materials through an in situ photoreduction and subsequent encapsulation process. Compared to traditional semiconductors and selected metal–organic frameworks (MOF) materials, these AgNPs@HOFs show significantly enhanced photocurrent. Most importantly, the portable PEC device based on AgNPs@HOF‐101 can selectively recognize 13 different mustard gas simulants, including 2‐chloroethyl ethyl sulfide (CEES), based on synergistic size‐exclusion and specific recognition. The extremely low detection limit for CEES (15.8 nmol L−1), reusability (at least 30 cycles), and long‐term working stability (at least 30 d) of the portable PEC device warrant its use as a chemical warfare agents (CWAs) sensor in practical field settings. More broadly, this work indicates that integrating porous molecular traps onto PEC sensors offers a promising strategy to further develop portable devices for CWAs detection with both ultrahigh sensitivity and selectivity.