Background. Immune checkpoint inhibitors (ICIs) have changed the situation of tumor therapy in recent years. However, for security reasons, those special populations are often excluded from clinical trials, such as infected hepatitis B or hepatitis C patients. ICIs are systematically reviewed and meta-analyzed for the first time in patients infected with hepatitis B or C in this paper. Methods. The relevant studies were searched in PubMed, EMBASE, Cochrane Library, and Web of Science until October 2022. Trials and observational studies meeting the inclusion criteria were included. The outcomes included the effectiveness of ICIs in patients with HBC/HCV (ORR, DCR, mOS, and mPFS), the incidence of adverse reactions, high-grade adverse reactions, and abnormal liver enzymes. At the same time, these indexes were compared with those of uninfected patients. Results. A total of 2,625 patients were enrolled, involving 1,179 patients with hepatitis (HBV or HCV). We found that ICIs showed higher ORR (25.80% vs. 18.10%) and DCR (66.22% vs. 58.74%) in patients with hepatitis B/C than those without infection. In terms of survival time, patients with hepatitis virus infection showed longer mOS (15.44 m vs. 13.30 m) but shorter mPFS (4.94 m vs. 5.01 m) than uninfected patients. As for safety data, patients with hepatitis showed a lower incidence of all-grade irAEs (68.02% vs. 70.43%) than uninfected patients, while that of 3-4 irAEs (21.27% vs. 21.79%) was similar in the two groups. However, hepatic dysfunction was more common and serious in hepatitis patients. Four HBVr and no HCVr were observed. Conclusion. According to this meta-analysis, ICIs are effective and safe for patients with hepatitis B or C, but basic liver enzymes have to be evaluated before treatment to avoid liver adverse events.