This study aimed to use visual mapping and bibliometric analysis to summarize valuable information on the tumor microenvironment (TME)-related research on hepatocellular carcinoma (HCC) in the past 20 years and to identify the research hotspots and trends in this field. We screened all of the relevant literature on the TME of HCC in the Web of Science database from 2003 to 2023 and analysed the research hotspots and trends in this field via VOSviewer and CiteSpace. A total of 2,157 English studies were collected. According to the prediction, the number of papers that were published in the past three years will be approximately 1,394, accounting for 64.63%. China published the most papers (n=1,525) and had the highest total number of citations (n=32,253). Frontiers In Immunology published the most articles on the TME of HCC (n=75), whereas, Hepatology was the journal with the highest total number of citations (n=4,104) and average number of citations (n=91). The four clusters containing keywords such as "cancer-associated fibroblasts", "hepatic stellate cells", "immune cells", "immunotherapy", "combination therapy", "landscape", "immune infiltration", and "heterogeneity" are currently hot research topics in this field. The keywords "cell death", "ferroptosis", "biomarkers", and "prognostic features" have emerged relatively recently, and these research directions are becoming increasingly popular. We identified four key areas of focus in the study of the TME in HCC: the main components and roles in the TME, immunotherapy, combination therapy, and the microenvironmental landscape. Moreover, the result of our study indicate that effect of ferroptosis on the TME in HCC may become a future research trend.