IMPORTANCE Pain is a common symptom among patients with kidney disease. However, little is known about use of analgesics among patients aged 65 years or older with chronic kidney disease (CKD) who do not receive dialysis treatment. OBJECTIVE To assess national trends and geographic variations in use of opioids and prescription nonsteroidal anti-inflammatory drugs (NSAIDs) in older adults with and without CKD in the US (2006-2015) and examine associations between use of opioids and patient outcomes. DESIGN, SETTING, AND PARTICIPANTS This cohort study used the 5% Medicare claims data (2005-2015) to select 10 retrospective annual cohorts of Medicare Part D beneficiaries aged 65 years and older from 2006 to 2015 and a retrospective longitudinal cohort. Data were analyzed in August 2019. EXPOSURES CKD status and other comorbidities identified using International Classification of Diseases, Ninth Revision, Clinical Modification codes. MAIN OUTCOMES AND MEASURES Analgesic use was measured by overall use (proportion of ever used opioids/NSAIDs), long-term use (prescribed >90 days), and cumulative use (total annual days' supply). Patient outcomes included progression to end-stage kidney disease (ESKD) and all-cause mortality. RESULTS A total of 6 260 454 beneficiaries (9.6% identified with CKD by claims) were selected in the annual cohorts and 649 339 beneficiaries (8.3% identified with CKD) were selected in the longitudinal cohort. There was significant growth in opioid use (31.2%-42.4%) and NSAID use (10.7%-16.6%) among patients aged 65 years and older with CKD from 2006 to 2015. Long-term use of opioids increased during 2006 to 2014 (25.8%-36.7%) but decreased through 2015 at 35.6%, while long-term use of NSAIDs remained stable. Opioid use was higher in patients with CKD, particularly CKD stages 4 to 5