Nitric oxide (NO) plays an essential role as signaling molecule in regulation of eukaryotic biomineralization, but its role in prokaryotic biomineralization is unknown. Magnetospirillum gryphiswaldense MSR-1, a model strain for studies of prokaryotic biomineralization, has the unique ability to form magnetosomes (magnetic organelles). We demonstrate here that magnetosome biomineralization in MSR-1 requires the presence of NsrRMg (anNO sensor) and a certain level of NO. MSR-1 synthesizes endogenous NO via nitrification-denitrification pathway to activate magnetosome formation. NsrRMg was identified as a global transcriptional regulator that acts as a direct activator of magnetosome gene cluster (MGC) and nitrification genes but as a repressor of denitrification genes. Specific levels of NO modulate DNA-binding ability of NsrRMg to various target promoters, leading to enhancing expression of MGC genes, derepressing denitrification genes, and repressing nitrification genes. These regulatory functions help maintain appropriate endogenous NO level. This study identifies for the first time the key transcriptional regulator of major MGC genes, clarifies the molecular mechanisms underlying NsrR-mediated NO signal transduction in magnetosome formation, and provides a basis for a proposed model of the role of NO in the evolutionary origin of prokaryotic biomineralization processes.