Abstract Objective To examine cancer risk associated with Janus kinase inhibitors (JAKis) and biological disease-modifying antirheumatic drugs (bDMARDs) in patients with rheumatoid arthritis (RA). Methods Case-control study of patients with RA age 65 years or older in the United States Surveillance, Epidemiology, and End Results (SEER)-Medicare database during 2014–2019. Cases were individuals with a first cancer diagnosed in SEER registries (N = 12 463). Cancer-free controls (N = 38 345) were Medicare beneficiaries residing in SEER areas. Exposure to JAKis, tumor necrosis factor inhibitors (TNFis), and other bDMARDs was ascertained using prescription claims. Logistic regression was used to estimate adjusted odds ratios (ORs). Results 1.9% of cases and 2.0% of controls were prescribed a JAKi. Among patients prescribed a JAKi, the median duration of documented exposure was 1.8 years. Overall cancer risk was not associated with exposure to JAKis (adjusted OR 1.04, 95% confidence interval [95%CI] 0.87–1.26), TNFis (0.98, 0.92–1.05), or other bDMARDs (0.98, 0.90–1.07). However, JAKi exposure was associated with significantly increased risk of lung cancer (OR 1.40, 95%CI 1.06–1.87), especially in males (2.12, 1.14–3.94) and with >2 years of JAKi exposure (1.52, 1.01–2.28). Among females, JAKi exposure was associated with lower risk of breast cancer (OR 0.62, 95%CI 0.39–0.97). Conclusions Among older adults with rheumatoid arthritis, JAKi exposure over a median of 1.8 years was not associated with an overall increase in cancer risk. However, lung cancer risk was elevated, supporting clinical caution in prescribing this medication class to smokers. Further research is needed to understand the role of the JAK/STAT pathway in cancer.