Early diagnosis of diseases, especially cancer, is critical for effective treatment. The unique properties of terahertz technology have attracted attention in this field. However, current terahertz bio-detection methods face challenges due to differences between the test environment and the actual in vivo conditions. In this study, a novel method is proposed for detecting in vivo-like cells using a biosensor chip composed of metamaterials and a cavity. The cavity has a thickness of ~50 μm. The structure can protect cells from damage and provides a liquid environment like an in vivo state. Through simulation analysis, the metamaterials sensor exhibits a theoretical sensitivity of 0.287 THz/RIU (Refractive Index Unit) with a 50 μm thick analyte. The detection method is experimentally validated using the apoptosis of glioma cells and various cell types. The biosensor investigates the apoptosis of glioma cells under the impact of temozolomide, and the trend of the results was consistent with the Cell Counting Kit-8 method. Furthermore, at a concentration of ~5200 cells/cm2, the experimental results demonstrate that the sensor can distinguish between neurons and glioma cells with a resonance frequency difference of approximately 30 GHz. This research has significant potential for detecting glioma cells and offers an alternative approach to in vivo-like cell detection.