Polarization detectors have significant applications in fields such as target background contrast enhancement and free-space optical communication. While the technology for polarization detection using polarizers and waveplates added to detector lenses is well-established, there is still limited research on on-chip integrated polarization detection based on hypersurface technology. In this paper, we present a novel inverted "T"-shaped double-layer subwavelength grating structure, integrated into an InSb detector for polarization detection in the mid-infrared wavelength region (3–5 μm). This structure primarily consists of a high refractive index dielectric layer and a subwavelength grating layer, which together improve the grating's transmittance and extinction ratio. Using the finite-difference time-domain (FDTD) method, we simulate and optimize the effects of various grating parameters on polarization performance. The results show that the optimized grating achieves a TM wave transmittance of nearly 80% within the 3–5 μm wavelength range, with an extinction ratio exceeding 45 dB, and is suitable for a wide range of incidence angles from 0° to 70°.