Electromagnetic-induced transparency (EIT) is a transparent window phenomenon with high transmittance in atomic systems, which has a broad application in the sensing field. We propose a compact graphene metamaterial sensor and analyze its mechanism of EIT-like effect. The unit cell is composed of an octagonal star graphene ring and a rectangular graphene ring and excites EIT-like effect through the strong coupling of the light mode and the dark mode. The compact graphene structure design improves the area utilization rate and contributes to the miniaturization of devices, and the EIT window is actively tunable by the change of the Fermi level of graphene to improve the applicable range of the sensor. The numerical simulation demonstrates that the refractive index sensitivity can reach 2.828 THz/RIU, meaning that the transmission curves of the sensor shift 2.828 THz per unit change of refractive index of the surrounding medium and its figure of merit can reach 5.34. The proposed structure can be applied to the high-sensitivity refractive index sensing in the terahertz band and has great application potential in the biological and chemical sensing field.