Background: Multiheme proteins have crucial roles in diverse nitrogen cycle processes. Results: The kustc1061 octaheme protein from anaerobic ammonium-oxidizing (anammox) bacteria specifically oxidizes hydroxylamine to NO. Conclusion: Enzyme specificity derives from subtle amino acid changes near the P 460 catalytic heme. Significance: The presence of kustc1061 homologs in anammox and other bacteria enables the detoxification of hydroxylamine, thereby generating NO for respiratory purposes.