Sepsis and endotoxemia impair hypoxic pulmonary vasoconstriction (HPV), thereby reducing arterial oxygenation and enhancing hypoxemia. Endotoxin induces nitric oxide (NO) production by NO synthase 2 (NOS2). To assess the role of NO and NOS2 in the impairment of HPV during endotoxemia, we measured in vivo the distribution of total pulmonary blood flow (QPA) between the right (QRPA) and left (QLPA) pulmonary arteries before and after left mainstem bronchus occlusion (LMBO) in mice with and without a congenital deficiency of NOS2. LMBO reduced QLPA/QPA equally in saline-treated wild-type and NOS2-deficient mice. However, prior challenge with Escherichia coli endotoxin markedly impaired the ability of LMBO to reduce QLPA/QPA in wild-type, but not in NOS2-deficient, mice. After endotoxin challenge and LMBO, systemic oxygenation was impaired to a greater extent in wild-type than in NOS2-deficient mice. When administered shortly after endotoxin treatment, the selective NOS2 inhibitor L-NIL preserved HPV in wild-type mice. High concentrations of inhaled NO attenuated HPV in NOS2-deficient mice challenged with endotoxin. These findings demonstrate that increased pulmonary NO levels (produced by NOS2 or inhaled at high levels from exogenous sources) are necessary during the septic process to impair HPV, ventilation/perfusion matching and arterial oxygenation in a murine sepsis model.