The benefit of rivaroxaban in thromboprophylaxis after oncologic lung surgery remains unknown. To evaluate the efficacy and safety of rivaroxaban, patients who underwent thoracic surgery for lung cancer were enrolled, and randomly assigned to rivaroxaban or nadroparin groups in a 1:1 ratio; anticoagulants were initiated 12–24 h after surgery and continued until discharge. Four hundred participants were required according to a noninferiority margin of 2%, assuming venous thromboembolism (VTE) occurrence rates of 6.0% and 12.6% for patients in the rivaroxaban and nadroparin groups, respectively. The primary efficacy outcome was any VTE during the treatment and 30‐day follow‐up periods. The safety outcome was any on‐treatment bleeding event. Finally, 403 patients were randomized (intention‐to‐treat [ITT] population), with 381 included in per‐protocol (PP) population. The primary efficacy outcomes occurred in 12.5% (25/200) of the rivaroxaban group and 17.7% (36/203) of the nadroparin group (absolute risk reduction, −5.2%; 95% confidence interval [CI], [−12.2–1.7]), indicating the noninferiority of rivaroxaban in ITT population. Sensitivity analysis was performed in the PP population and yielded similar results, confirming the noninferiority of rivaroxaban. In the safety analysis population, the incidence of any on‐treatment bleeding events did not differ significantly between the groups (12.2% for rivaroxaban vs. 7.0% for nadroparin; relative risk [RR], 1.9; 95% CI, [0.9–3.7]; p = .08), including major bleeding (9.7% vs. 6.5%; RR, 1.6 [95% CI, 0.9–3.7]; p = .24), and nonmajor bleeding (2.6% vs. 0.5%; RR, 5.2 [95% CI, 0.6–45.2]; p = .13). Rivaroxaban for thromboprophylaxis after oncologic lung surgery was shown to be noninferior to nadroparin.