Perioperative discontinuation of oral anti-parkinsonian medication can negatively impact the prognosis of abdominal surgery in patients with Parkinson's disease. Although intravenous levodopa may be an alternative, its efficacy has not yet been investigated. To determine the efficacy of intravenous levodopa as an alternative to oral anti-Parkinsonian drugs during gastric or colorectal cancer surgery. We identified patients with Parkinson's disease who underwent surgery for gastric or colorectal cancer between April 2010 and March 2020, using the Diagnosis Procedure Combination database, a nationwide inpatient database in Japan. Patients were divided into two groups: those who received intravenous levodopa during the perioperative period and those who did not. We compared in-hospital mortalities, major complications, and postoperative length of stay between the groups after adjusting for background characteristics with overlap weights based on propensity scores. We identified 648 patients who received intravenous levodopa and 1207 who did not receive levodopa during the perioperative period. In the adjusted cohort, the mean postoperative length of stay was 24.7 and 29.0 days (percent difference, -7.7%; 95% confidence interval, -13.1 to -1.5); in-hospital death was 3.2% and 3.3% (adjusted odds ratio, 0.95; 95% CI: 0.54-1.67); and incidence of major complications were 21.4% and 19.3% (adjusted odds ratio, 0.89; 95% confidence interval, 0.70-1.13) in those with and without intravenous levodopa, respectively. Intravenous levodopa was associated with a shorter postoperative length of stay, but not with mortality or morbidity. Intravenous levodopa may improve perioperative care in patients with Parkinson's disease.