Detection of nitrogen dioxide, NO2, is required to monitor the air-quality for human health and safety. Commercial sensors are typically chemiresistors, however field-effect transistors are being investigated. Although numerous investigations have been reported, the NO2 sensing mechanism is not clear. Here, the detection mechanism using ZnO field-effect transistors is investigated. The current gradually decreases upon NO2 exposure and application of a positive gate bias. The current decrease originates from the trapping of electrons, yielding a shift of the threshold voltage towards the applied gate bias. The shift is observed for extremely low NO2 concentrations down to 10 ppb and can phenomenologically be described by a stretched-exponential time relaxation. NO2 detection has been demonstrated with n-type, p-type, and ambipolar semiconductors. In all cases, the threshold voltage shifts due to gate bias induced electron trapping. The description of the NO2 detection with field-effect transistors is generic for all semiconductors and can be used to improve future NO2 sensors.