Abstract Backgrounds Pericardial effusion (PE) is often an obstacle to cancer treatment and a life-threatening factor. Although cancer survival has improved over the past two decades, an appropriate treatment method for PE in cancer patients has not yet been established. The purpose of this study was to investigate the temporal trends and clinical results in the method of drainage of PE. Methods Between 2003 and 2022, 744 consecutive patients with malignant PE who underwent pericardial drainage were retrospectively analyzed. The patients were divided according to the time of pericardial drainage (Period 1: 2003-2012, Period 2: 2013-2022) and initial drainage method (pericardiocentesis vs. window surgery). The rates of all-cause death and redo pericardial drainage for recurrent PE were compared according to the drainage methods. Results In comparison with Period 1, there was an increasing number of patients who underwent pericardial drainage in Period 2 (235 vs. 509). However, the proportion of window surgery decreased (21.7 vs. 14.9%, P=0.029). The median survival time of patients was improved (4.4 vs. 6.3 months, log-rank P<0.001). There was no significant difference in all-cause death and 30-day mortality (24.4 vs. 18.6%, P=0.171) after drainage between surgery and pericardiocentesis groups. The window surgery group had a significantly lower incidence of redo pericardial drainage than the pericardiocentesis group (hazard ratio [HR]: 0.49, 95% confidence interval [CI]: 0.26–0.91, P=0.022). In Period 1, there was no significant difference in redo pericardial drainage between window surgery and pericardiocentesis (HR: 0.78, 95% CI: 0.35–1.74, P=0.540). However, the window surgery group had significantly lower redo pericardial drainage than the pericardiocentesis group in Period 2(HR: 0.33, 95% CI: 0.12–0.91, P=0.024). Conclusions The window surgery was safe in cancer patients. As cancer survival rates improve, surgery showed benefits in reducing redo pericardial drainage. Pericardial window surgery could be preferred over pericardiocentesis in patients who expected longer life expectancy.