The adaptation of marine fish to freshwater environments includes prodigious examples of rapid evolution.Given the scarcity of ω‐3 long‐chain polyunsaturated fatty acids (LC‐PUFA) in freshwater, we expect selection to be strong on fish transitioning to freshwater habitats and yet the underlying ecological causes of genomic and phenotypic differentiation are poorly understood for traits associated with lipid content and composition. Threespine stickleback Gasterosteus aculeatus have repeatedly colonized, and adapted to, freshwater habitats across the Northern Hemisphere. These freshwater populations often show elevated copy number of the fatty acid desaturase 2 gene (FADS2), which increases the biosynthetic capacity of LC‐PUFA. The starkly lower content of LC‐PUFA in freshwater compared to marine prey, especially docosahexaenoic acid (DHA), likely imposes strong positive selection on freshwater fish for either increased biosynthesis or greater dietary acquisition of LC‐PUFA. The recently colonized and relatively undisturbed threespine stickleback populations in postglacial coastal lakes of southern Greenland offer an exceptional opportunity to study how variation in the copy number of FADS2 is related to abiotic and biotic conditions of lakes and their morphometry. As expected, given its position on the stickleback X chromosome, we found strong sexual dimorphism in FADS2 copy number in all populations (19 freshwater, 1 marine and 1 brackish), and an increased dimorphism in some freshwater populations. We also found that FADS2 copy number was negatively correlated, for both males and females, with the abundance of copepods, which are a DHA‐rich food source in the zooplankton community. Overall, our results suggest that the prey community context of lakes might influence the process of metabolic adaptation of marine fish colonizing freshwater ecosystems.