The invention relates to a terahertz sensor which comprises a cover layer and a substrate. The cover layer and the substrate are oppositely arranged. A metal micro-structure array is arranged on the surface, opposite to the substrate, of the cover layer, a metal reflecting mirror surface is arranged on the surface, opposite to the cover layer, of the substrate, and there is a gap between the metal micro-structure array and the metal reflecting mirror surface. A micro-flow channel is formed in the gap between the cover layer and the metal reflecting mirror surface, the micro-flow channel is used for accommodating a liquid sample to be detected, and the height of the micro-flow channel is micron-sized. According to the invention, the metal micro-structure array is used as a metamaterial, a metamaterial wave absorber is formed by the metal micro-structure array, the metal reflecting mirror surface and the gap between the metal microstructure array and the metal reflecting mirror surface, and quantitative and qualitative detection of a liquid sample is realized by utilizing the characteristics that the metamaterial is very sensitive to the change of the dielectric property of the surrounding environment and the resonance of a local electromagnetic field is remarkably enhanced by a Fabry-Perot resonant cavity of the metamaterial wave absorber and the unique properties of terahertz waves such as low photon energy, strong penetrability, and fingerprint spectrum characteristic.