In fire-prone ecosystems, many plants possess traits that enhance their relative flammability and ecologists have suggested increased flammability could result from natural selection. To date, theoretical models addressing the evolution of flammable characteristics assume that flammable plants realize some direct fitness advantage. In this paper, we explore the idea that enhanced flammability can increase in frequency in a population without any direct fitness benefit to the flammable type. In our model, flammability evolves due to an association between an allele that promotes flammability and alleles at unlinked loci that give high fitness. In analogy to genetic hitchhiking, in which a deleterious allele can invade due to a genetic linkage, we call this process "genetic niche-hiking," because the association results from localized niche construction. Specifically, flammable plants sacrifice themselves and their neighbors to produce local fire-cleared gaps (the constructed niche) in which their offspring are able to continually track an ever-changing environment. Niche-hiking requires that mating, dispersal and niche construction all occur locally (i.e. the population is spatially structured), such that offspring are likely to experience the niches their parents construct. Using a spatially-explicit lattice-based simulation, we find that increased flammability can evolve despite the "self-killing" cost of such a trait. Genetic niche-hiking may also be applicable to the evolution of other traits in spatially structured ecological systems such as plant disease susceptibility and forest tree characteristics that influence gap production.