Understanding how landscape heterogeneity mediates the effects of fire on biodiversity is increasingly important under global changes in fire regimes. We used a simulation experiment to investigate how fire regimes interact with topography and weather to shape neutral and selection-driven genetic diversity under alternative dispersal scenarios, and to explore the conditions under which microrefuges can maintain genetic diversity of populations exposed to recurrent fire. Spatial heterogeneity in simulated fire frequency occurred in topographically complex landscapes, with fire refuges and fire-prone “hotspots” apparent. Interannual weather variability reduced the effect of topography on fire patterns, with refuges less apparent under high weather variability. Neutral genetic diversity was correlated with long-term fire frequency under spatially heterogeneous fire regimes, being higher in fire refuges than fire-prone areas, except under high dispersal or low fire severity (low mortality). This generated different spatial genetic structures in fire-prone and fire-refuge components of the landscape, despite similar dispersal. In contrast, genetic diversity was only associated with time since the most recent fire in flat landscapes without predictable refuges and hotspots. Genetic effects of selection driven by fire-related conditions depended on selection pressure, migration distance and spatial heterogeneity in fire regimes. Allele frequencies at a locus conferring higher fitness under successional environmental conditions followed a pattern of “temporal adaptation” to contemporary conditions under strong selection pressure and high migration. However, selected allele frequencies were correlated with spatial variation in long-term mean fire frequency (relating to environmental predictability) under weak dispersal, low selection pressure and strong spatial heterogeneity in fire regimes.