Guidelines provide differing recommendations regarding direct-acting oral anticoagulants vs low-molecular-weight heparin (LMWH) for treatment of cancer-associated thrombosis (CAT). This study was undertaken to evaluate the effectiveness and safety of rivaroxaban vs LMWH for treatment of CAT. Using US Surveillance, Epidemiology and End Results-Medicare–linked data from 2013 through 2016, we evaluated adults with active breast, lung, ovarian, or pancreatic cancer, who were admitted to the hospital or treated in the emergency department for CAT and were prescribed rivaroxaban or LMWH for outpatient anticoagulation. Patients with luminal gastrointestinal or genitourinary cancers were excluded. Rivaroxaban and LMWH users were 1:1 propensity score matched. Outcomes included the composite of recurrent thrombosis or major bleeding, each outcome separately, and mortality at 6 months, using an intent-to-treat approach. On-treatment analysis after 12 months was also performed. Proportional hazards models for the subdistribution of competing risk were used to estimate hazard ratios (HRs) with 95% confidence intervals (CIs). We included 529 rivaroxaban- and 529 LMWH-treated patients with CAT. Rivaroxaban was not associated with differences in risk of the composite outcome (HR, 0.71; 95% CI, 0.41-1.22), major bleeding (HR, 1.01; 95% CI, 0.50-2.01), or mortality (HR, 0.87; 95% CI, 0.70-1.07) vs LMWH, but it reduced recurrent thrombosis (HR, 0.37; 95% CI, 0.15-0.95). On-treatment analysis at 12 months showed similar results. Rivaroxaban may be a reasonable alternative to LMWH for patients with CAT without gastrointestinal or genitourinary cancer.