Single-nucleotide variations in C13orf31 (LACC1) that encode p.C284R and p.I254V in a protein of unknown function (called 'FAMIN' here) are associated with increased risk for systemic juvenile idiopathic arthritis, leprosy and Crohn's disease. Here we set out to identify the biological mechanism affected by these coding variations. FAMIN formed a complex with fatty acid synthase (FASN) on peroxisomes and promoted flux through de novo lipogenesis to concomitantly drive high levels of fatty-acid oxidation (FAO) and glycolysis and, consequently, ATP regeneration. FAMIN-dependent FAO controlled inflammasome activation, mitochondrial and NADPH-oxidase-dependent production of reactive oxygen species (ROS), and the bactericidal activity of macrophages. As p.I254V and p.C284R resulted in diminished function and loss of function, respectively, FAMIN determined resilience to endotoxin shock. Thus, we have identified a central regulator of the metabolic function and bioenergetic state of macrophages that is under evolutionary selection and determines the risk of inflammatory and infectious disease.