Background: Noninvasive assessment of liver fibrosis has important clinical significance. Different techniques including two-dimensional shear-wave elastography (2D SWE) and real-time tissue elastography (RTE) are reported to be useful for the noninvasive diagnosis of hepatic fibrosis. All these techniques are affected by many factors. How to choose a reasonable method needs further studies. Purpose: This study was conducted to comparatively assess the diagnostic performance of 2D SWE and RTE in patients with Chronic Hepatitis B (CHB) and influence of inflammation on the stiffness values obtained by both techniques, so as to objectively assess the reasonable choice between these 2 elastography techniques for noninvasive assessment of hepatic fibrosis in clinical practice. Materials and Methods: Four-hundred and thirty-seven patients with CHB meeting the inclusion criteria were enrolled in the study. All patients underwent liver stiffness measurements by using 2D SWE and RTE on the same day. Histologic fibrosis was staged and inflammation activity was graded based on the METAVIR scoring system on liver biopsy specimens. Results: The liver stiffness values by using 2D SWE and RTE both increased in parallel with the degree of liver fibrosis and the grade of inflammation. However, the diagnostic efficacy of significant fibrosis and cirrhosis using 2D SWE was significantly higher than that of RTE. The 2D SWE measurement values were statistically different in different alanine aminotransferase (ALT) levels and METAVIR activity grades; however, no statistically significant differences were observed by using RTE. The diagnostic efficacy of 2D SWE significantly varied with elevated ALT levels compared with RTE. Conclusion: 2D SWE was more accurate than RTE in the assessment of significant fibrosis and cirrhosis in patients with CHB. Compared with RTE, the measurement values and diagnostic performance obtained by 2D SWE were prone to be more easily affected by the inflammation fluctuations.