Diclofenac has increased cardiovascular risks, but its risk profile compared with other COX-2 inhibitors remains unknown. The aim of this study was to compare the cardiovascular risks of diclofenac versus other older and newer COX-2 inhibitors (coxibs). Using Danish nationwide health registries (1999-2020), we conducted a series of emulated trials (n=264). Eligible adults had no recent NSAID prescriptions, contraindications or conditions with low adherence. We included initiators of diclofenac (n=1,600,202), meloxicam (n=10,903), etodolac (n=238,538), celecoxib (n=77,591), and etoricoxib (n=12,122). We computed the adjusted intention-to-treat incidence rate ratio (aIRR) with 95% confidence interval (CI) of major adverse cardiovascular events (MACE) within 30 days of initiation (5562 events). MACE was 20% increased among initiators of diclofenac compared with other older COX-2 inhibitors (aIRR 1.19, 95% CI 1.10-1.28), driven by cardiac death (aIRR 1.57, 95% CI 1.21-2.03). The effect appeared strongest for women (aIRR 1.28, 95% CI 1.15-1.43), individuals with high baseline cardiovascular risk (aIRR 1.32, 95% CI 1.05-1.66), and when comparing high-dose diclofenac with low doses of the other older COX-2 inhibitors (aIRR 1.31, 95% CI 1.13-1.52). The results reflected increased rates compared with both meloxicam (aIRR 1.46, 95% CI 0.94-2.26) and etodolac (aIRR 1.18, 95% CI 1.09-1.28). Diclofenac initiators had similar increased rates of MACE compared with coxibs (aIRR 0.96, 95% CI 0.85-1.08), consistent for celecoxib (aIRR 1.02, 95% CI 0.88-1.19) and etoricoxib (aIRR 0.85, 95% CI 0.66-1.10). The increased cardiovascular risks associated with diclofenac initiation were higher than for other older COX-2 inhibitors (meloxicam/etodolac) and comparable to coxibs (celecoxib/etoricoxib).