Diabetes mellitus often results in a number of complications involving impaired brain function, including cognitive deficits and depression. However, the potential mechanisms for diabetes-related cognitive deficits and depression are not fully understood. Neurons in the hippocampal, cortical and amygdala functional regions are more susceptible to damage during hyperglycemia. Neuroprotection in the brain can rescue cognitive deficits and depression induced by hyperglycemia. This study investigated the potential mechanisms underlying diabetes-related congnitive deficits and depression, determined whether the inflammatory factor inducible nitric oxide synthase (iNOS) and the nitric oxide (NO)/soluble guanylyl cyclases (sGC)/cyclic guanosine monophosphate (cGMP)/protein kinase G (PKG) pathway, play key roles in cognitive deficits and depression associated. In the present study, diabetic animal models were induced by streptozotocin (STZ, 150 mg/kg) in mice, and aminoguanidine (AG), a selective inhibitor of iNOS, was given by intraperitoneal injection for 10 weeks. Blood glucose, activities of NOS and the levels of NO in serum and brain regions were measured. The spatial memory was detected using the Morris water maze test, depressive behavior was evaluated by the tail suspension test (TST), forced swimming test (FST), closed field test (CFT) and open field test (OFT). We also detected neuronal survival and cleaved caspase-3 positive ratios in three brain regions and the levels of iNOS, sGC, cGMP and PKG in hippocampus and frontal cortex. Data indicated that diabetic mice exerted impairments in spatial memory, decreased locomotor activity and increased immobile time in diabetic mice. In addition, diabetic mice had significantly decreased surviving neuronal density and showed signs of obvious neuronal injury in the hippocampus, frontal cortex and amygdala. iNOS overexpression and its associated signaling pathway NO/sGC/cGMP/PKG in the hippocampus and frontal cortex were implicated during hyperglycemia. However, AG improved the behavior disorders, reduced the activity of iNOS, protected nerve cells and inhibited the level of iNOS, sGC, PKG and cleaved caspase-3 in the hippocampus and cortex. These results suggested that iNOS/NO/sGC/cGMP/PKG signal pathway is a key feature of cognitive deficits and depression associated with diabetes. AG ameliorated cognitive deficits and depression in diabetic mice by exerting anti-inflammatory and neuroprotective effects by suppressing iNOS-associated signaling pathways.