In this paper, a 2-D air holes in silicon slab photonic crystal-based structure with line defect has been designed and simulated for detection of high glucose concentration in urine from 0–15 to 10 gm/dl in the wavelength range of 1530–1565 nm. High glucose concentration in urine is referred as glycosuria. The proposed sensor structure is modeled and simulated in time domain by using Massachusetts Institute of Technology (MIT) electromagnetic equation propagation simulation tool. Finite-difference time-domain method has been used for the analysis. Band structure has been computed and eigen frequencies have been extracted for each k-point for the designed sensor structure by using (MIT photonic bands) simulation tool. The changes in the normalized output power levels, quality ( $Q$ )-factor, and resonant frequency have been observed for different concentrations of glucose present in urine. The calculated value of $Q$ -factor obtained is $Q=23\,575$ . This paper has been done for normal urine and glycosuric urine. It is clear from the simulated graphs of transmission spectrum and band structure that for minute changes in the refractive index, the transmitted output power level range varies from 0.2298 to −0.091 dB and the resonant frequency range varies from 0.229259–0.22914 (in units of c/a) and hence it acts as a sensor for detection for glycosuria. Our designed sensor has achieved sensitivity of 638 nm /RIU.