Heterophylly is a phenomenon whereby an individual plant dramatically changes leaf shape in response to the surroundings. Hygrophila difformis (Acanthaceae; water wisteria), has recently emerged as a model plant to study heterophylly because of its striking leaf shape variation in response to various environmental factors. When submerged, H. difformis often develops complex leaves, but on land it develops simple leaves. Leaf complexity is also influenced by other factors, such as light density, humidity, and temperature. Here, we sequenced and assembled the H. difformis chromosome-level genome (scaffold N50: 60.43 Mb, genome size: 871.92 Mb), which revealed 36 099 predicted protein-coding genes distributed over 15 pseudochromosomes. H. difformis diverged from its relatives during the Oligocene climate-change period and expanded gene families related to its amphibious habit. Genes related to environmental stimuli, leaf development, and other pathways were differentially expressed in submerged and terrestrial conditions, possibly modulating morphological and physiological acclimation to changing environments. We also found that auxin plays a role in H. difformis heterophylly. Finally, we discovered candidate genes that respond to different environmental conditions and elucidated the role of LATE MERISTEM IDENTITY 1 (LMI1) in heterophylly. We established H. difformis as a model for studying interconnections between environmental adaptation and morphogenesis.