The vital gases carry through the hemoglobin; hence, the detection and analysis of hemoglobin concentration are crucial in the physiology processes. In this context, we introduce a biosensor based on a one-dimensional photonic crystal with a defect layer for oxygen sensing in hemoglobin. In this innovative approach, hemoglobin is the defect layer and its refractive index changes with oxygen dissolution. The variation of the refractive index leads to a shift in the transmission spectrum, which can be utilized to distinguish between oxygenated and deoxygenated hemoglobin. The theoretical investigation of transmission spectra using the transfer matrix method reveals that both hemoglobin states can be effectively distinguished. The proposed sensor exhibits remarkable sensitivity, particularly with the optimum structure featuring a defect layer thickness of 12 μm, seven layers, and an incident angle (θ) of 81 deg, providing a sensitivity of 1510.5 nm/RIU. These findings underscore the high-performance potential of our sensor in the region of oxygen sensing in biology, particularly in medical applications.