In the open ocean, migration of fishes occurs in both horizontal and vertical planes. Movement of the small fishes and crustacea that form the planktonic prey of whale sharks (Rhincodon typus) from the surface to deep, cool water (300-500 m) during the day (diel vertical migration; DVM) presents a major challenge for a species that filter-feeds using a gill. Using data-logging tags we have shown that whale sharks use a variety of behavioural strategies to access prey in deep water and to ensure cost-effective foraging. The costs of feeding in deep water and energy conservation advantages associated with a specialised body plan provide strong selective pressure for the development of large body size. Variation in these costs through ontogeny explains horizontal patterns in migration of these animals, notably the tendency to form aggregations in warm coastal waters at many tropical locations around the world. Recognition of these key selective factors also provide insights into the evolution of body size in filter-feeding marine vertebrates through evolutionary time.