Human-induced habitat changes often generate novel or radically altered habitat characteristics, which can impair the ability of organisms to differentiate between suitable and unsuitable sites. This phenomenon, often termed an ecological trap, has been identified as a potential driver of biodiversity loss worldwide. However, few unequivocal examples have been documented, even in agricultural environments where contemporary habitat changes have been rapid and significant. Several problems complicate the detection of ecological traps in the field, including difficulties in measuring key parameters such as relative habitat preference. Here, we assess habitat selection preferences and breeding success of the yellow wagtail Motacilla flava, a UK red-listed declining passerine, in arable farmland. We combine habitat-specific density indices with measures of home range exclusivity to make inferences on relative habitat preference that are robust to the confounding effect of competitive exclusion. Using multiple measures of breeding success, we identify maladaptive habitat selection patterns at the scale of both territory and nest site choice. Yellow wagtails showed a preference for establishing territories within field bean crops, but subsequently suffered high nest predation rates. Similarly, pairs showed a preference for nesting close to tramlines within cereal fields, but nests further from tramlines achieved higher success due to lower predation rates. We found no evidence of competitive exclusion among neighbouring pairs, suggesting that density-based indices provided an accurate reflection of relative habitat preferences. Our findings highlight the potential role of maladaptive habitat selection in suppressing breeding success among farmland species.