The gene expressing the FK506 binding protein 51 (FKBP5) is involved in the regulation of glucocorticoid receptor sensitivity. The rs1360780 SNP in this gene (T allele vs C homozygous) has been found to be associated with major depressive disorder (MDD). The aim of our study was to investigate whether this polymorphism might be associated with altered brain structure and function in a cohort of 40 patients with MDD and 43 healthy controls. A functional magnetic resonance imaging (fMRI) emotional attention task was employed. Diffusion tensor imaging (DTI) was also conducted, extracting mean diffusivity (MD) and fractional anisotropy (FA) from brain areas that showed functional differences between patients expressing the two alleles of the rs1360780 SNP. Finally, the effect of the interaction of childhood adversity as measured by the Childhood trauma Questionnaire (CTQ) and rs1360780 allele status was analyzed in relation to DTI measures using a general linear model. All results presented are family-wise error (FWE) corrected. Functional interactions were found between genotype and diagnosis (p<0.01). Patients carrying the high-risk allele, compared with patients not carrying it, showed reduced activity in the rolandic operculum, Heschl gyrus, insula, parahippocampal gyrus, posterior cingulate cortex, inferior frontal gyrus (p<0.05 for all measures); and increased MD and reduced FA measures in many of these regions (p<0.05). An interaction between CTQ scores and allele status was associated with DTI changes in the insula, rolandic operculum, and inferior frontal gyrus. Here, the presence of both the high-risk allele and higher CTQ scores was associated with higher MD and lower FA values (p<0.05). In conclusion, MDD patients expressing the T allele of rs1360780, compared with C homozygous patients, exhibit functional and structural differences in areas involved in emotional perception and inhibition. The interaction between the T allele and childhood maltreatment explained our structural findings in these regions, suggesting that their altered maturation and function might be influenced by early chronic stress in the presence of this genetic trait.