Shell shape varies within many ammonoid species, and some ammonoid lineages appear to have evolved in concert with changes in their environment. We report variation within an Upper Cretaceous ammonoid species that correlates with facies differences and is consistent with a hydrodynamic explanation. In the Turner Sandy Member of the Carlile Shale (Turonian) of South Dakota and Wyoming, more compressed morphs of Scaphites whitfieldi Cobban are found in nearshore sandy facies, whereas more depressed morphs occur in offshore muds. We measured drag forces on models of juvenile and adult shells that differed in lateral compression of the shell. Plots of drag coefficient as a function of Reynolds number indicate that thinner, more compressed morphs swam more efficiently at higher velocities and depressed morphs swam more efficiently at low velocities. Higher swimming velocities may be essential for life in nearshore sandy environments, which have higher ambient current velocities. Shelled cephalopods swim most efficiently at low swimming speeds; therefore, lower velocity, more energetically economical swimming should be preferred in more quiescent offshore settings. An analysis of power consumption supports this interpretation. Correlated changes in shell compression and environmental factors, here observed within a species, have been documented in numerous ammonite lineages. These iterative evolutionary changes within lineages may be similarly explained by selection for shell morphologies appropriate to environments that fluctuate cyclically with sea level.