Background: Hepatic fibrosis, a chronic pathological condition, is associated with adverse outcomes in stroke patients. Cardioembolism (CE) is a common etiology of stroke, yet the association between hepatic fibrosis and CE remains understudied. Aim: This study aims to investigate the association between hepatic fibrosis and CE-induced stroke, as well as its impact on stroke patient prognosis. Methods: This retrospective study included 344 acute ischemic stroke (AIS) patients who underwent thrombolytic therapy. Hepatic fibrosis was assessed using the Fibrosis-4 (FIB-4) index and the Aspartate Aminotransferase-Platelet Ratio Index (APRI). Mediation analysis examined the role of CE in the association between hepatic fibrosis and 3-month functional outcomes. Results: Among 344 patients, 319 were classified using the Trial of Org 10172 in Acute Stroke Treatment criteria. Severe fibrosis (FIB-4 ≥ 2.01) was observed in 131 patients (38.08%), and CE was identified in 79 patients. FIB-4 was an independent predictor of CE (OR: 2.038, 95%CI: 1.507- 2.757, p < 0.001) and poor 3-month functional outcome (OR: 1.477, 95%CI: 1.103-1.978, p = 0.009) after adjusting for confounders. The effect of FIB-4 on poor 3-month functional outcomes was partially mediated by CE, with a mediation proportion of 30.63%. Conclusions: Hepatic fibrosis is a significant predictor of short-term functional outcomes in AIS, particularly cardioembolic stroke. The association between hepatic fibrosis and stroke outcomes is partially mediated through CE. These findings highlight the importance of assessing hepatic fibrosis in stroke patients, particularly those with CE etiology.