Copy number variation (CNV) can cause phenotypic changes. However, in contrast to amino acid substitutions and cis-regulatory changes, little is known about the functional categories of genes in which CNV is important for adaptation to novel environments. It is also unclear whether the same genes repeatedly change the copy numbers for adapting to similar environments. Here, we investigate CNV associated with freshwater colonization in fishes, which was observed multiple times across different lineages. Using 48 ray-finned fishes across diverse orders, we identified 23 genes whose copy number increases were associated with freshwater colonization. These genes showed enrichment for peptide receptor activity, hexosyltransferase activity and unsaturated fatty acid metabolism. We further revealed that three of the genes showed copy number increases in freshwater populations compared to marine ancestral populations of the stickleback genus Gasterosteus. These results indicate that copy number increases of genes involved in fatty acid metabolism (FADS2), immune function (PSMB8a) and thyroid hormone metabolism (UGT2) may be important for freshwater colonization at both the inter-order macroevolutionary scale and at the intra-genus microevolutionary scale. Further analysis across diverse taxa will help to understand the role of CNV in the adaptation to novel environments. This article is part of the theme issue 'Genetic basis of adaptation and speciation: from loci to causative mutations'.