Some studies have shown that the balance between top-down and bottom-up processes is context dependent, but few have tested how biotic interactions can affect this balance. We quantified the attack frequencies by the stem borer moth Haimbachia sp. nov. on the cordgrasses Spartina densiflora and S. alterniflora in 5 marshes of the southwestern Atlantic coastline, located between 36°S and 41°S. We examined whether ecosystem engineering by burrowing crabs Neohelice (Chasmagnathus) granulata, which improves plant performance, increases herbivory incidence by moths. The results show that moths attack an important proportion of Spartina spp. stems (4% to 26%). Moth attack frequencies were higher on low elevation than on high elevation marsh plants, probably due to variations in plant performance across the physical stress gradient. Within marshes, burrowing crab densities and moth attack frequencies were positively correlated, suggesting that ecosystem engineering by crabs may increase moth attacks. Field experiments confirmed this prediction and suggest that the effect of crabs on moth attacks may be driven by nutrient availability. Our results show that stem-boring herbivores can cause significant plant mortality in Spartina spp. marshes, and that ecosystem engineering by burrowing crabs increases this effect. Thus, in this system, biotic factors that improve plant performance lead to an increase in herbivory control.