This study aimed to compare the serum lipid profiles between tenofovir disoproxil fumarate (TDF) and tenofovir alafenamide (TAF) in the long-term treatment of chronic hepatitis B (CHB). We analyzed data from treatment-naïve CHB patients administered with TDF or TAF, collected from electronic medical records between May 2017 and September 2022. Serum lipid indices, including total cholesterol (TC), triglycerides (TG), low-density (LDL) and high-density lipoprotein (HDL), and their ratios (TC/HDL, LDL/HDL), were assessed at baseline, and at 48 and 96 weeks. Propensity score matching (PSM) adjusted for baseline differences between groups. From 2344 patients initially screened, 418 were included for the 48-week analysis (265 on TDF, 153 on TAF) and 292 for the 96-week analysis (238 on TDF, 54 on TAF). At 48 weeks, comparing the serum lipid indicators between the pre- and post-treatment, TDF significantly reduced TC and TC/HDL, whereas TAF induced widespread dyslipidemia, characterized by elevated levels of TC, TG, LDL, LDL/HDL, and TC/HDL, and reduced HDL (P < 0.05). After PSM grouping, TAF remained significantly associated with higher TC, TG, LDL, LDL/HDL, and TC/HDL compared to TDF (P < 0.05). Over 48 weeks, TAF treatment was associated with significant increases in TC, TG, and LDL, whereas TDF treatment led to decreases (P < 0.05). TC/HDL and LDL/HDL increased in both groups, but more significant in TAF (P < 0.05). At 96 weeks, the TAF group continued to exhibit significantly higher levels of TC, LDL, and LDL/HDL compared to the TDF group (P < 0.05). Notably, LDL levels were 115.65 ± 28.07 mg/dL in TAF versus 96.07 ± 23.97 mg/dL in TDF. The increase in TC/HDL ratio in the TAF group was higher than in the TDF group, though not statistically significant. Furthermore, TAF treatment was associated with significant increases in LDL (18.58 ± 24.35 mg/dL) and LDL/HDL ratio (0.41 ± 0.95) over 96 weeks, while TDF treatment showed reductions in TC (-8.13 ± 30.86 mg/dL). Between 48 and 96 weeks, most lipid changes in the TDF group were not statistically significant, except for increases in LDL and LDL/HDL. In the TAF group, an increasing trend of LDL and TC/HDL was noted, although LDL showed a slight turnover after 48 weeks. This real-world study provides new evidence that TAF can induce dyslipidemia, while TDF exhibits a lipid-lowering effect in CHB. Patients at high risk for hepatic steatosis and cardiovascular diseases should consider these effects when choosing between TAF and TDF.