Macrofauna of sheltered and pocket beaches located in embayments, estuaries or landward of protective reefs has not been adequately assessed in beach ecology. In this setting, the concurrent role of large‐scale morphodynamics and wave‐exposure gradients in shaping biological patterns is still uncertain. To examine variations in community descriptors and the influence of physical factors on macrofauna, 12 sandy beaches on five islands within Sepetiba Bay (SE Brazil) were characterized in terms of beach morphodynamics and dimensions (length and width), such as geographical position relative to the bay mouth. A total of 80 species were collected and identified. Community descriptors of macrofauna responded to morphodynamics and exposure gradients. Increases in species richness, and abundance, from harsh reflective (coarse sands, steep slopes) to benign dissipative (fine sands, gentle slopes) beaches, and from the bay mouth (exposed beaches) towards the inner bay (sheltered beaches) were observed. Mollusks were the most abundant macrofaunal group, followed by crustaceans and polychaetes. Crustaceans dominated the beaches near the bay mouth, whereas mollusks were more abundant on the beaches farther from the bay mouth. Canonical correspondence analysis showed that the degree of exposure, distance from the bay mouth, beach index, and beach length and width significantly affected the macrofauna distribution and abundance, creating an environmental gradient along Sepetiba Bay. Differences in macrofauna composition among the beaches studied were associated with beach length and width. In this sense, spatial variation of macrofauna among beaches can be a function of intertidal area. These results indicate that community characteristics in the sandy beaches studied are affected by several physical characteristics, but also by other factors that are affected by coastal processes.