Habitat loss and fragmentation have led to a widespread increase in the proportion of edge habitat in the landscape. Disturbance-dependent bird species are widely assumed to benefit from these edges. However, anthropogenic edges may concentrate nest predators while retaining habitat cues that birds use to select breeding habitat. This may lead birds to mistakenly select dangerous habitat—a phenomenon known as an “ecological trap.” We experimentally demonstrated how habitat shape, and thus amount of edge, can adversely affect nest site selection and reproductive success of a disturbance-dependent bird species, the Indigo Bunting (Passerina cyanea). We did so within a landscape-scale experiment composed of equal-area habitat patches that differed in their amount of edge. Indigo Buntings preferentially selected edgy patches, which contained 50% more edge than more compact rectangular patches. Further, buntings fledged significantly fewer young per pair in edgy patches than in rectangular patches. These results provide the first experimental evidence that edges can function as ecological traps.