Food-chain length, the number of feeding links from the basal species to the top predator, is a key characteristic of biological communities. However, the determinants of food-chain length still remain controversial. While classical theory predicts that food-chain length should increase with increasing resource availability, empirical supports of this prediction are limited to those from simple, artificial microcosms. A positive resource availability -chain length relationship has seldom been observed in natural ecosystems. Here, using a theoretical model, we show that those correlations, or no relationships, may be explained by considering the dynamic food-web reconstruction induced by predator's adaptive foraging. More specifically, with foraging adaptation, the food-chain length becomes relatively invariant, or even decreases with increasing resource availability, in contrast to a non-adaptive counterpart where chain length increases with increasing resource availability; and that maximum chain length more sharply decreases with resource availability either when species richness is higher or potential link number is larger. The interactive effects of resource availability, adaptability and community complexity may explain the contradictory effects of resource availability in simple microcosms and larger ecosystems. The model also explains the recently reported positive effect of habitat size on food-chain length as a result of increased species richness and/or decreased connectance owing to interspecific spatial segregation.