• The nanocomposite sensing material based on ZnSnO 3 nanocubes-modified Ti 3 C 2 T x MXene nanosheets was synthesized. • The ZnSnO 3 nanocubes/Ti 3 C 2 T x MXene composites express excellent formaldehyde sensing performance at room temperature. • The main reason for the enhanced sensing performance is attributed to the heterojunctions. Due to the particular advantages of synergistic effects and single components, design and fabrication of two-dimensional (2D) hybrids with high activity has obtained the attention of gas sensing researches. Herein, ZnSnO 3 /Ti 3 C 2 T x MXene nanocomposites have been fabricated through a facile electrostatic self-assembly method by using ZnSnO 3 nanocubes and layered Ti 3 C 2 T x MXene. Characterization results demonstrated that the ZnSnO 3 nanocubes were well combined with layered Ti 3 C 2 T x MXene. Then, at room temperature the sensors, based on ZnSnO 3 /Ti 3 C 2 T x MXene nanocomposites, exhibit remarkable selectively to formaldehyde, high response (194.7% to 100 ppm and 62.4% to 5 ppm), the fast response/recovery times (6.2/5.1 s to 100 ppm). In addition, the sensors demonstrate outstanding linearity and excellent repeatability with the low detection limit (ppm-level) towards formaldehyde. It is a strategy with the potential in the application field of room temperature gas detection via compositing metal oxide semiconductor with layered Ti 3 C 2 T x MXene.