The objective of this study was to investigate the effects of nutrient density and dietary energy source on performance and immune function of weanling pigs that were either challenged or not challenged with Escherichia coli lipopolysaccharide (LPS). A basal diet was formulated to contain 14 g CP/MJ DE and 7 g lysine/100 g CP. Sulfur amino acids, threonine and tryptophan were kept constant relative to lysine. Experimental diets were mixed using 70 parts basal diet and either 30 parts starch or an isocaloric amount (14 parts) of lard. Diets were fed either for ad libitum intake or on a pair-feeding basis to evaluate effects of diet nutrient density or source of energy, respectively. On d 9 and 25, pigs were challenged i.m. with either 1 mL of a LPS solution or a control solution. Lymphocyte blastogenesis was measured 2 d after the LPS administration and antibody response to sheep red blood cells (SRBC) or ovalbumin was determined 3 d after challenge. No interactive effects on performance were observed between LPS challenge and energy density or source of energy (P > .10). Injection of LPS tended to reduce feed intake and daily gain (P < .10), but not efficiency of feed or energy utilization. Addition of fat to the diets improved feed efficiency and efficiency of energy utilization for gain (P < .05). No consistent effects of LPS challenge, energy density, or source of energy were observed for lymphocyte blastogenesis. Antibody response to ovalbumin, but not to SRBC, was decreased by fat (P < .05). Results indicate that increasing energy density of the diet did not alter the performance depression due to LPS challenge. Addition of fat to the diet improved feed efficiency and efficiency of energy conversion but may depress the humoral immune response. Effects of fat on the immune response may depend on the immune status of the pig.