FixL is a sensor histidine kinase of the two component system, which regulates the expression of the genes related to nitrogen fixation in the root nodule in response to the O2 levels. The crystal structure of the sensor domain of FixL, which contains a heme as a sensing site, was determined at 1.4 Å resolution. Based on the structure, we propose the O2 sensing mechanism: conformational changes in the distal side of the heme, which are induced by steric repulsion between the bent-bound O2 and the Ile209 side chain, would be transmitted to the histidine kinase domain. Our mechanism permits FixL to serve a real oxygen sensor, which can distinguish bent-bound O2 to other liner-bound ligands.