Polyploidization is pervasive in plants, but little is known about the niche divergence of wild allopolyploids (species that harbor polyploid genomes originating from different diploid species) relative to their diploid progenitor species and the gene expression patterns that may underlie such ecological divergence. We conducted a fine-scale empirical study on habitat and gene expression of an allopolyploid and its diploid progenitors. We quantified soil properties and light availability of habitats of an allotetraploid Cardamine flexuosa and its diploid progenitors Cardamine amara and Cardamine hirsuta in two seasons. We analyzed expression patterns of genes and homeologs (homeologous gene copies in allopolyploids) using RNA sequencing. We detected niche divergence between the allopolyploid and its diploid progenitors along water availability gradient at a fine scale: the diploids in opposite extremes and the allopolyploid in a broader range between diploids, with limited overlap with diploids at both ends. Most of the genes whose homeolog expression ratio changed among habitats in C. flexuosa varied spatially and temporally. These findings provide empirical evidence for niche divergence between an allopolyploid and its diploid progenitor species at a fine scale and suggest that divergent expression patterns of homeologs in an allopolyploid may underlie its persistence in diverse habitats.