To investigate the effectiveness of shear-wave elastography (SWE) based on e-health in diagnosing liver fibrosis in patients infected with hepatitis B virus (HBV) and provide theoretical basis for early diagnosis and treatment of patients with chronic HBV infection, in this study, 73 patients with chronic HBV infection who underwent e-health SWE examination were divided into chronic hepatitis B group (51 cases) and hepatitis B cirrhosis group (22 cases), and another 20 healthy volunteers were introduced as control. The contents of second liver two half-and-half, hyaluronic acid (HA) of liver fibrosis, laminin (LN), pAUVollagen III N terminal peptide (PIII NP), collage type IV (CIV), and HBV-DNA were detected. SWE was used to measure the elastic modulus in the S2 and S3 segments of the left outer lobe of the liver, S4 segment of the left inner lobe of the liver, S5 and S8 segments of the right anterior lobe of the liver, and S6 and S7 segments of the right posterior lobe of the liver. Finally, the correlations between the four examination results of liver fibrosis and the elastic modulus values were compared, and the receiver operator characteristic curve (ROC) for SWE technical diagnosis was drawn. The results showed that there was no significant difference in HBV-DNA content between the two groups (
P
>
0.05
); the contents of alanine transaminase (ALT) and aspartate aminotransferase (AST) in the blood of chronic hepatitis B group were significantly higher than those in the liver cirrhosis group (
P
<
0.05
); HA, PIII NP, and CIV contents were significantly lower than the liver cirrhosis group (
P
<
0.05
); the success rates of SWE detection in S5 and S6 segments of the two groups were 100.00%, and the elastic modulus of the hepatitis B cirrhosis group was significantly higher than that of the chronic hepatitis B group (
P
<
0.05
); correlation results showed HA, PIII NP, and CIV of two groups of patients and elastic modulus value in S5 and S6 segments showed positive correlation (
P
<
0.05
); ROC curve analysis showed that AUC (area under the curve) was 0.866, the sensitivity was 89.59%, and the specificity was 76.49%, which indicated that the liver elastic modulus value measured by e-health SWE technology can quantitatively show liver fibrosis in patients with chronic HBV infection, and its application in the diagnosis of clinical liver fibrosis was real and feasible.