Background: Allopurinol is a frequently used, effective, and affordable medication for gout. However, poor adherence to allopurinol is a key reason for patients not reaching treatment goals. The aim of this study was to comprehensively assess factors associated with high allopurinol adherence in gout. Methods: In this national cohort study, we used the health-care databases of the US Department of Veterans Affairs (VA) from 2002 to 2016 and a new-user design to assess potential predicting factors of allopurinol adherence. Veterans were included in this study if they had International Classification of Diseases (ninth revision) code 274.x for gout in two or more outpatient encounters or one or more inpatient encounters during 2002–16; incident allopurinol use; and at least 12 months of observation. Potential predictors of allopurinol adherence (defined as medication possession ratio [days used divided by days prescribed] of >80%) were examined using Andersen's health-care utilisation model and multivariable-adjusted logistic regression analyses. Findings: Between Oct 1, 2002, and Sept 30, 2016, 565 812 potentially eligible patients were included in the VA database, of whom 264 614 (46·8%) met the eligibility criteria and were included in the study cohort. The mean age was 67·8 years (SD 11·7) and mean body-mass index was 33·0 kg/m2 (6·4). Factors significantly associated with higher odds of allopurinol adherence in multivariable-adjusted analyses were older age (odds ratio 1·01, 95% CI 1·01–1·01); Deyo-Charlson comorbidity index score of 1 (1·05, 1·02–1·07) or 2 or more (1·05, 1·03–1·07) versus a score of 0; higher body-mass index (all categories from 25 to <30 [1·12, 1·08–1·17] to ≥45 [1·47, 1·39–1·55] vs 18·5 to <25); a military service connection of 50% or higher (1·37, 1·29–1·46) versus 0%; care in a community-based outpatient clinic (1·11, 1·08–1·14) versus in a VA Medical Center; and rural residence (1·02, 1·00–1·05). Factors significantly associated with lower odds of allopurinol adherence were black (0·74, 0·72–0·76), Hispanic (0·68, 0·65–0·72), or other race or ethnicity (0·86, 0·82–0·89) versus white race; non-rheumatologist care provider (0·83, 0·79–0·88); allopurinol start dose of 101–200 mg per day (0·93, 0·91–0·95) or more than 300 mg per day (0·75, 0·72–0·79) versus 100 mg per day or less; or allopurinol use in the previous year (0·80, 0·79–0·82). Compared with residence in the Midwest, patients in other US regions had lower odds of adherence (mid-Atlantic 0·89, 0·87–0·92; northeast 0·84, 0·81–0·87; south 0·85, 0·83–0·88; west 0·86, 0·83–0·89). Compared with a baseline serum urate of 360 to less than 480 μmol/L, serum urate of less than 360 μmol/L was associated with higher odds of adherence (1·28, 1·25–1·32), whereas baseline serum urate of 480 to less than 600 μmol/L (0·86, 0·84–0·88) or 600 to less than 720 μmol/L (0·92, 0·89–0·94) was associated with lower odds of adherence. Interpretation: We identified several important factors associated with high allopurinol adherence. Clinicians and policy makers can now target modifiable factors at the patient, provider, or systems level, with the aim of improving allopurinol adherence, and thereby overall gout care. Funding: National Institute of Arthritis, Musculoskeletal and Skin Diseases, US National Institutes of Health.