Little is known about the evolutionary implications of habitat fragmentation, although altered selection regimes could influence the genetic constitution of fragmented populations. In particular, fragmentation might lead to selection for enhanced stress resistance and tolerance of unfavorable environmental conditions. We investigated the evolutionary consequences of habitat fragmentation in Drosophila birchii flies from small fragments and the interior of large forests of northern Queensland, Australia, in three consecutive years. Evolved differences were detected in a common garden design. Flies from fragments were larger and less desiccation resistant, particularly in the first year, when they also developed faster, and had higher preadult survival under fluctuating temperatures. Furthermore, juvenile survival and adult body size were linked to a measure of habitat quality, the abundance of D. birchii in nature. The results support the hypothesis that fragmentation and habitat quality impose divergent selection. The results also bolster the conservation strategy of maintaining genetic variation for ecologically relevant traits, because persistence in fragmented habitats seems to depend on genetic variation in multiple expressed traits.