The invention provides a small two-stage vacuum rectangular ion trap mass spectrometer and a detection method thereof. The mass spectrometer comprises two stages of vacuum cavities. The first-stage vacuum cavity is internally provided with an atmospheric pressure interface sampling cone, a quadrupole rod and an ion gate electrode which form a quadrupole ion trap. The second-stage vacuum cavity is internally provided with a rectangular ion trap, an ion detector and a capillary tube. An ion optical element is arranged between the two stages of vacuum cavities. The detection method includes the steps that the quadrupole ion trap in the first-stage cavity is controlled to be in an ion trap storage mode and an ion trap synchronous analysis mode so that sensitivity of mass spectra can be improved, the quantitation limit is reduced, analysis flux is increased, influences of the space charge effect are reduced, and the resolution is increased. The quadrupole rod does not need high resolution and is low in processing precision requirement. Besides, the rectangular trap is easy to process and assemble, so that miniaturization is facilitated. Meanwhile, the detection method can guarantee good analysis performance and has wide application prospects in the field of on-site analysis and detection.