Nicotinic acid could improve intestinal antimicrobial peptides to enhance resistance of weaned piglets to E. coli infection by regulating intestinal microflora and its metabolites, histone deacetylase SIRT1 and HDAC7, modification sites such as acH3K9, acH3K27, and pH3S10 in the promoter region. This evidence concerns the gene HDAC7 and escherichia coli infection.