The FK506-binding protein 51 (FKBP51) emerged as a key player in several diseases like stress-related disorders, chronic pain, and obesity. Linear analogues of FK506 called SAFit were shown to be highly selective for FKBP51 over its closest homologue FKBP52, allowing the proof-of-concept studies in animal models. Here, we designed and synthesized the first macrocyclic FKBP51-selective ligands to stabilize the active conformation. All macrocycles retained full FKBP51 affinity and selectivity over FKBP52 and the incorporation of polar functionalities further enhanced affinity. Six high-resolution crystal structures of macrocyclic inhibitors in complex with FKBP51 confirmed the desired selectivity-enabling binding mode. Our results show that macrocyclization is a viable strategy to target the shallow FKBP51 binding site selectively.