A hydrophilic hetero-Diels-Alder cycloadduct was synthesized as a novel photocontrollable donor of reactive nitrogen species. Production of either nitric oxide (NO) or nitroxyl (HNO) was photoinduced from this compound, depending on the environmental polarity.