The aim of this study was to optimize the extraction process of polysaccharides from the fruiting bodies of Lentinus edodes and investigate its anti-hepatitis B virus activity. The extracting parameters including ultrasonic power (240–320W), extraction temperature (40–60°C) and extraction time (15–25min) was optimized by using three-variable-three-level Box-Behnken design based on the single-factor experiments. Data analysis results showed that the optimal conditions for extracting LEPs were an extraction temperature of 45°C, extraction time of 21min and ultrasonic power of 290W. Under these optimal conditions, the experimental yield of LEPs was 9.75%, a 1.62-fold increase compared with conventional heat water extraction (HWE). In addition, crude polysaccharides were purified to obtain two fractions (LEP-1 and LEP-2). Chemical analysis showed that these components were rich in glucose, arabinose and mannose. Furthermore, HepG2.2.15 cells were used as in vitro models to evaluate their anti-hepatitis B virus (HBV) activity. The results suggest that LEPs possesses potent anti-HBV activity in vitro.