Several decapod groups independently colonized freshwater and terrestrial habitats and became independent from the sea. These invasions were accompanied by analogous reproductive and developmental traits such as large eggs and an abbreviated, lecithotrophic development. Here, we present the first empirical study on the evolution of reproductive and developmental traits that accompany the invasion of land by crabs. As crucial steps in the colonization, we identify the transitions of the larval nursery, first, from the marine plankton into landlocked-brackish nurseries and, second, into fresh water. During these invasions, the early life-cycle stages were facing new ecological conditions and selective agents. We test hypotheses on the evolution of egg size and the mode of development in relation to the larval ecology of recent species and draw conclusions on their evolutionary past. As a model we focus on the genus Sesarma, that colonized Jamaica relatively recently and comprises species with a larval development in marine, brackish and freshwater habitats. In addition, we compare representatives of the crab genera Armases, Sesarma and Uca that invaded brackish-nursery habitats independently. The analysis reveals that in each genus the transition from marine to brackish nurseries resulted in fewer and larger eggs, an abbreviated development and higher endotrophic potential of larvae, and a wider tolerance to physicochemical stress (salinity). Size at metamorphosis, however, did not change in brackish species, suggesting that it is constrained. Within the Sesarma-lineage, egg size increases considerably from marine to freshwater species. The duration of embryonic development, the size and endotrophic potential of larvae are positively correlated, but the duration of the larval phase is negatively correlated with egg size. Hypotheses suggesting that large eggs evolved as a response to limited food or intense predation are inadequate to explain the initial egg-size increase in brackish species. We suggest that the specific abiotic environment of the brackish nurseries ultimately selected for increased egg size. These particular larval nurseries of brackish species of Armases, Sesarma and Uca are nutrient rich but ephemeral habitats with unfavourable physicochemical conditions, which strongly favour a swift larval phase and possibly large body size and higher salinity-stress resistance of larvae. The reason for the further and substantial increase in egg size in freshwater species remains unknown. The ‘food-limitation’ hypothesis derived from laboratory experiments, however, is inadequate to explain this increase. Our results support general life-history hypotheses (‘safe harbour’ hypothesis) that predict the evolution of large eggs if post-embryonic stages face high risk of mortality, but not the predicted positive relationship between egg size and instantaneous egg stage mortality. On the contrary, we find a negative relationship, suggesting that larger eggs are a ‘safer harbour’ than smaller eggs. We outline a scenario for the invasion of land by crabs and propose a two-step model: as a first step, an instant shift of the larval development from offshore into landlocked-brackish nurseries, and, as a second step, from there into freshwater nurseries.