The large increase in milk yield and the structural changes in the dairy industry have caused major changes in the housing, feeding and management of the dairy cow. However, while large improvements have occurred in production and efficiency, the disease incidence, based on veterinary records, does not seem to be improved. Earlier reviews have covered critical periods such as the transition period in the cow and its influence on health and immune function, the interplay between the endocrine system and the immune system and nutrition and immune function. Knowledge on these topics is crucial for our understanding of disease risk and our effort to develop health and welfare improving strategies, including proactive management for preventing diseases and reducing the severity of diseases. To build onto this the main purpose of this review will therefore be on the effect of physiological imbalance (PI) on immune function, and to give perspectives for prevention of diseases in the dairy cow through nutrition. To a large extent, the health problems during the periparturient period relate to cows having difficulty in adapting to the nutrient needs for lactation. This may result in PI, a situation where the regulatory mechanisms are insufficient for the animals to function optimally leading to a high risk of a complex of digestive, metabolic and infectious problems. The risk of infectious diseases will be increased if the immune competence is reduced. Nutrition plays a pivotal role in the immune response and the effect of nutrition may be directly through nutrients or indirectly by metabolites, for example, in situations with PI. This review discusses the complex relationships between metabolic status and immune function and how these complex interactions increase the risk of disease during early lactation. A special focus will be placed on the major energetic fuels currently known to be used by immune cells (i.e. glucose, non-esterified fatty acids, beta-hydroxybutyrate and glutamine) and how certain metabolic states, such as degree of negative energy balance and risk of PI, contribute to immunosuppression during the periparturient period. Finally, we will address some issues on disease prevention through nutrition.