This species is euryhaline and mostly inhabits brackish estuaries, coastal lagoons and the lower reaches of rivers.
It also occurs in freshwater habitats, however, including a number of inland lakes in Sri Lanka although it appears to have been introduced intentionally.
The congener E. suratensis typically occurs in the same habitats and there exists evidence to suggest that this sympatry is not random and may represent a mutually beneficial relationship with a little cheating on the part of E. maculatus (see ‘Diet’ and ‘Notes’).
In the Chembarampakkam Lake, a man-made freshwater reservoir on the Adayar River close to the city of Chennai in Tamil Nadu state, India, it occurs alongside numerous other fish species including Notopterus notopterus, Puntius amphibius, P. chola, P. vittatus, Pethia conchonius, Dawkinsia filamentosa, Laubuca laubuca, Esomus danricus, Mystus cavasius, M. vittatus, Neotropius atherinoides, Xenentodon cancila, Oryzias dancena, Macrognathus pancalus, Parambassis ranga, Trichogaster lalius, and Channa punctata, plus the non-natives Trichopodus trichopterus and Oreochromis sp. (tilapia).
This species can be maintained in fresh or brackish water so long as acidic conditions are avoided.
Décor is largely down to personal choice although a degree of structure, perhaps incorporating a sandy substrate, variably-shaped rocks and some driftwood branches, would adequately simulate natural conditions.
It is intolerant to accumulation of organic pollutants and requires spotless water meaning weekly water changes of 25-50% volume should be considered routine.