The spatial scale at which samples are collected and analysed influences the inferences that can be drawn from landscape genetic studies. We examined genetic structure and its landscape correlates in the pitcher plant midge, Metriocnemus knabi, an inhabitant of the purple pitcher plant, Sarracenia purpurea, across several spatial scales that are naturally delimited by the midge’s habitat (leaf, plant, cluster of plants, bog and system of bogs). We analysed 11 microsatellite loci in 710 M. knabi larvae from two systems of bogs in Algonquin Provincial Park (Canada) and tested the hypotheses that variables related to habitat structure are associated with genetic differentiation in this midge. Up to 54% of variation in individual-based genetic distances at several scales was explained by broadscale landscape variables of bog size, pitcher plant density within bogs and connectivity of pitcher plant clusters. Our results indicate that oviposition behaviour of females at fine scales, as inferred from the spatial locations of full-sib larvae, and spatially limited gene flow at broad scales represent the important processes underlying observed genetic patterns in M. knabi. Broadscale landscape features (bog size and plant density) appear to influence oviposition behaviour of midges, which in turn influences the patterns of genetic differentiation observed at both fine and broad scales. Thus, we inferred linkages among genetic patterns, landscape patterns and ecological processes across spatial scales in M. knabi. Our results reinforce the value of exploring such links simultaneously across multiple spatial scales and landscapes when investigating genetic diversity within a species.