The aim of the present study was to conduct a meta-analysis for elucidating the effects of antibiotic prophylaxis on infection, rebleeding and mortality in patients who underwent endoscopic therapy for variceal hemorrhage. Articles on antibiotic prophylaxis and on-demand antibiotic administration following endoscopic therapy for acute variceal bleeding were searched on PubMed, Embase and Cochrane Library between January 1959 and February 2024, to elucidate whether the use of prophylactic antibiotics was necessary. The quality of randomized controlled trials (RCTs) was assessed using the Cochrane risk-of-bias assessment tool and RevMan software version 5.4.1 was used for meta-analysis of the data. The current meta-analysis included four RCTs and 322 patients with acute variceal bleeding who underwent endoscopic therapy. All included studies were of high quality according to the Cochrane risk-of-bias assessment tool. According to the results of the meta-analysis, the incidence of infection in the prophylactic antibiotic group was significantly lower than that in the on-demand group [odds ratio (OR), 0.31; 95% confidence interval (CI), 0.13-0.74; P=0.009]. The prophylactic antibiotic group also exhibited a lower incidence of rebleeding compared with that of the on-demand group (OR, 0.37; 95% CI, 0.19-0.72; P=0.003). No significant differences were noted in the incidence of mortality between the two groups (OR, 0.92; 95% CI, 0.45-1.92; P=0.83). In conclusion, the data indicated that antibiotic prophylaxis is recommended to be used in patients who have undergone endoscopic therapy for variceal hemorrhage.