Here the authors delineate the dynamic changes in 3D genome and epigenome of differentiating macrophages and during infection with Mycobacterium tuberculosis. They reveal a role for NF-κB upon infection and identify SNPs in disease-susceptible loci, including rs1873613 that is located in the anchor of a dynamic chromatin loop.