© 2019, The Author(s). Brain-derived neurotrophic factor (BDNF) gene regulation has been linked to the pathophysiology of major depressive disorder (MDD). MDD patients show cognitive deficits, and altered BDNF regulation has a relevant role in neurocognitive functions. Our goal was to explore the association between BDNF genetic and epigenetic variations with neurocognitive performance in a group of MDD patients and healthy controls considering possible modulating factors. The sample included 134 subjects, 64 MDD patients, and 70 healthy controls. Clinical data, childhood maltreatment, and neurocognitive performance were assessed in all participants. Eleven single nucleotide polymorphisms (SNPs) and two promoter regions in the BDNF gene were selected for genotype and methylation analysis. The role of interactions between BDNF genetic and epigenetic variations with MDD diagnosis, sex, and Childhood Trauma Questionnaire (CTQ) scores was also explored. We observed significant associations between neurocognitive performance and two BDNF SNPs (rs908867 and rs925946), an effect that was significantly mediated by methylation values at specific promoter I sites. We identified significant associations between neurocognitive results and methylation status as well as its interactions with MDD diagnosis, sex, and CTQ scores. Our results support the hypothesis that BDNF gene SNPs and methylation status, as well as their interactions with modulating factors, can influence cognition. Further studies are required to confirm the effect of BDNF variations and cognitive function in larger samples.