The complex between the N-methyl-d-aspartate receptor (NMDAR), neuronal nitric oxide synthase (nNOS), and the postsynaptic density protein-95 (PSD-95) is an attractive therapeutic target for the treatment of acute ischemic stroke. The complex is formed via the PDZ protein domains of PSD-95, and efforts to disrupt the complex have generally been based on C-terminal peptides derived from the NMDAR. However, nNOS binds PSD-95 through a β-hairpin motif, providing an alternative starting point for developing PSD-95 inhibitors. Here, we designed a cyclic nNOS β-hairpin mimetic peptide and generated cyclic nNOS β-hairpin peptide arrays with natural and unnatural amino acids (AAs), which provided molecular insights into this interaction. We then optimized cyclic peptides and identified a potent inhibitor of the nNOS/PSD-95 interaction, with the highest affinity reported thus far for a peptide macrocycle inhibitor of PDZ domains, which serves as a template for the development of treatment for acute ischemic stroke.