Associations between habitat and animal distributions are widely used to make conservation recommendations. However, short‐term studies do not allow investigation of temporal variation in associations as habitats change or populations decline. Here we quantify changes in the habitat attributes and distribution of breeding territories in a multiple‐brooded, crop‐nesting farmland bird, the Corn Bunting Emberiza calandra, over a 20‐year period during which the study population declined by 91%. Corn Buntings were positively associated with weedy fields, overhead wires, spring cereals and, in early summer, with winter barley and forage grass. Territory associations with wires (positive) and fallow (positive in early summer, negative in late summer) were stronger in later years when the population was smaller. Trends in the proportions of males holding territories into late summer (decline), and mated polygynously or not at all (increases), suggested that habitat quality declined and became more spatially variable in later years. Field size increased and weed abundance within fields declined, reducing the availability of field‐boundary song‐posts, invertebrate‐rich foraging habitats and physical cover for nests within crops. Conservation recommendations are for weed‐rich or under‐sown spring cereals and winter barley combined with late‐cut hay and fallow, especially when offered close to song‐posts such as overhead wires. We also demonstrate the value of long‐term studies by comparing our 20‐year analysis with 3‐year periods at the start, middle and end of this period, and expose some risks of conservation recommendations derived from short studies.