Environmental factors add constraints to organismal performance at their extremes, but support optimal performance at energetically beneficial conditions. In aquatic environments, salinity adds costs for ion transportation to the energetic budgets of osmoregulating animals, such as teleost fishes. These additional costs may limit the available energy for important ecological traits of fishes, including maximal and optimal swimming performance, which are required for successful foraging and migration in the wild. Here, we hypothesize that swimming performance, and its related costs, will be optimized at near-isoosmotic salinity, and decline under more saline conditions. Using the euryhaline shiner perch (Cymatogaster aggregata) as a model for coastal fishes, we determined critical swimming speeds and oxygen consumption rates during swimming at salinities of 12 g kg−1 (near-isoosmotic, brackish, S12) and 31 g kg−1 (hyperosmotic, marine, S31). Most tested metrics were unaffected by salinity, including aerobic scope, active metabolic rate and optimal swimming speed. Likewise, critical swimming speed (in body lengths per second, BL s−1) was not significantly different between fishes acclimated to S12 (4.8 ± 0.6 BL s−1) or S31 (5.1 ± 0.5 BL s−1, means ± SD, n = 5) suggesting that the fish could swim and hunt for prey equally well regardless of salinity. However, S31 conditions did cause comparatively higher oxygen consumption rates at swimming speeds from 0.5 to 1.5 BL s−1, and a 20% increase in the extrapolated standard metabolic rate (i.e. cost of maintaining bodily functions). Our results confirm that there is an added energetic cost of salinity, but highlight that the cost of osmoregulation appears minimal relative to the energetic demands of swimming, and consequently has no effect on the maximal swimming performance of adult shiner perch. Given the strong salinity gradients naturally encountered in many coastal ecosystems, these data provide an explanation for the capacity of a coastal roaming species to move in an out of coastal habitat zones without significantly compromising their ability to hunt prey, avoid predation and migrate. As climate change locally affects environmental salinity, our results offer valuable insight towards the effects of environmental perturbations on fishes in coastal marine and estuarine habitats.