Understanding the feeding habits of the Mexican barracuda, Sphyraena ensis Jordan and Gilbert, 1882, is important to elucidate relevant aspects of its trophic ecology (prey intake, diet breadth, trophic level, and energy flows), which in general provide valuable information on the dynamics of marine communities. Therefore, the purpose of this work was to assess the dietary habits of the Mexican barracuda, S. ensis, and to determine dietary variations by sex (males, females), size (small, medium, and large individuals), and season (rainy and dry). Monthly samples were obtained from February 2014 to January 2015 in the San Blas region, Nayarit, Mexico. A total of 308 specimens were captured. Individuals measured between 30.6 and 58.7 cm total length and weighed between 405 and 836 g. Of the analyzed stomachs, 264 (86%) contained food and 44 (14%) were empty. The diet of the Mexican barracuda comprised 13 prey items from 11 families, 12 genera, and 9 species. According to the index of relative importance, the most important prey were fishes, particularly Sardinops spp. (40.36%), Hemiramphus saltator (40.24%), Opisthopterus dovii (10.83%), Anchoa spp. (4.17%), and Mugil cephalus (3.05%). We conclude that the Mexican barracuda can be categorized as an opportunistic ichthyophagous predator in coastal epipelagic zones that feeds mainly on schooling fish species. The trophic spectrum did not vary significantly by sex or size, but the consumption of preferred prey varied significantly by season.