Little is known about variation in gene expression that affects life history traits in wild populations of outcrossing species. Here, we analyse heritability of larval development traits and associated variation in gene expression in the Glanville fritillary butterfly (Melitaea cinxia) across three ecologically relevant temperatures. We studied the development of final-instar larvae, which is greatly affected by temperature, and during which stage larvae build up most of the resources for adult life. Larval development time and weight gain varied significantly among families sampled from hundreds of local populations, indicating substantial heritable variation segregating in the large metapopulation. Global gene expression analysis using common garden-reared F2 families revealed that 42% of the >8000 genes surveyed exhibited significant variation among families, 39% of the genes showed significant variation between the temperature treatments, and 18% showed a significant genotype-by-environment interaction. Genes with large family and temperature effects included larval serum protein and cuticle-binding protein genes, and the expression of these genes was closely correlated with the rate of larval development. Significant expression variation in these same categories of genes has previously been reported among adult butterflies originating from newly established versus old local populations, supporting the notion of a life history syndrome put forward based on ecological studies and involving larval development and adult dispersal capacity. These findings suggest that metapopulation dynamics in heterogeneous environments maintain heritable gene expression variation that affects the regulation of life history traits.