The anti-humidity properties of metal oxide semiconductors have become an important performance index requirement for the commercialization of gas sensors since ambient humidity is inescapable in many situations which changes rapidly depending on the region and climate. Herein, functionalized In2O3 nanospheres with enhanced response value and anti-humidity properties to triethylamine (TEA) were prepared by self-assembly of trimethoxypropylsilane (PTES) on the surface of In2O3. The effect of different levels of PTES functionalization on gas sensing properties was investigated in detail. Furthermore, the PTES-In2O3 sensor exhibited a high response (9.3–100 ppm TEA at 80 RH%), a remarkable relative response (95.6 %), a low theoretical detection limit (920 ppb), and long-term stability. The superior gas sensing properties can be attributed to the hydrophobicity of the alkyl chains in the PTES molecule, and the PTES captures free electrons from In2O3 which widens the electron depletion layer. Therefore, the strategy can be widely applied to construct metal oxide gas sensors with excellent humidity resistance and high gas response properties.