Prey-predator interactions are considered one of the primary drivers of the ecology and evolution of several vertebrate taxa, but particularly, it has played a significant role in the evolutionary biology of snakes. However, feeding ecology of semifossorial tropical snakes has been poorly studied. We employed a multivariate approach to explore the effects of sexual dimorphism, prey-predator interaction, and climatic variability due to El Niño–Southern Oscillation (ENSO) on the abundance and feeding ecology of the semifossorial snake Ninia atrata. Climatic variability analysis revealed conspicuous temporal variation in the prey availability at microhabitat, as well as in the snake abundance and food intake. Multivariate approach provided strong support for links between Ninia atrata abundance, microhabitat quality and snails abundance (more than other prey). Conspicuous intersexual dietary divergence was observed supporting the hypothesis of the sex-specific targets for maximum food intake. ENSO phenomenon promoted a notable decline in Ninia atrata abundances and its food intake, which was related to prey availability and abundance, as well as a strong variability on their body condition index (BCI). Finally, given the high sensitivity of Ninia atrata to the environmental variability, it could consider an indicator species of the environmental changes in the Neotropical oil palm agroecosystems.