The strongest epidemiological clue that the environment at the population level has a significant impact on the risk of developing multiple sclerosis is the well established, and in many instances, increasing latitudinal gradient of prevalence, incidence and mortality globally, with prevalence increasing by up to 10-fold between the equator and 60° north and south. The drivers of this gradient are thought to be environmental with latitude seen as a proxy for ultraviolet radiation and thus vitamin D production; however, other factors may also play a role. Several important questions remain unanswered, particularly when in the life course is the gradient established, does lifetime migration mitigate or exacerbate previously reported latitude gradients at location of diagnosis, and do factors such as sex or multiple sclerosis disease phenotype influence the timing or significance of the gradient? Utilizing lifetime residence calendars collected as part of the New Zealand National Multiple Sclerosis Prevalence Study, we constructed lifetime latitudinal gradients for multiple sclerosis from birth to prevalence day in 2006 taking into account migration internally and externally and then analysed by sex and multiple sclerosis clinical course phenotype. Of 2917 individuals living in New Zealand on prevalence day, 7 March 2006, with multiple sclerosis, 2127 completed the life course questionnaire and of these, 1587 were born in New Zealand. All cohorts and sub-cohorts were representative of the overall multiple sclerosis population in New Zealand on prevalence day. We found that the prevalence gradient was present at birth and was, in fact, stronger than at census day, and the slope of the gradient persisted until the age of 12 before gradually declining. We found that internal and external migration into New Zealand had little, if any, effect on the gradient except to decrease the significance of the gradient somewhat. Finally, we found as we had reported previously, that the lifetime prevalence gradients were largely driven by females with relapse onset multiple sclerosis. These findings confirm for the first time the importance of early life environmental exposures in the risk of multiple sclerosis indicating strongly that exposures as early as in utero and at birth drive the latitudinal gradient. Consequently, prevention studies should be focused on high-risk individuals and populations from the earliest possible time points especially, when appropriate, on females.