Hericium erinaceus polysaccharides (HEPs) were isolated from the fruiting bodies of H. erinaceus with 53.36 % total carbohydrates and 32.56 % uronic acid. To examine whether HEPs can alter the diversity and the abundance of gut microbiota, adult mice and middle-aged and old mice were fed with HEPs for 28 days. Based on the result of 16S sequencing of gut microbiota it was found that the relative abundances of Lachnospiraceae and Akkermansiaceae significantly increased, while the relative abundance of Rikenellaceae and Bacteroidaceae appeared to decrease. Bacterial solutions from different murine intestinal segments and feces were collected to ferment HEPs in vitro. It was found that HEPs remarkably promoted the production of NO, IL-6, IL-10, INF-γ and TNF-α. Moreover, HEPs significantly increased phosphorylation of signaling molecules, indicating that the immunomodulatory activity was completed via NF-кB, MAPK and PI3K/Akt pathways. Collectively, HEPs have potential to be developed as functional ingredients or foods to promote health.