We assessed a ketogenic diet (KD) intervention protocol and the cognitive effects of KD in older adults with HIV-associated neurocognitive impairment. Adults older than 50 years and living with HIV and mild-to-moderate neurocognitive impairment were randomized to either a KD or a patient-choice diet for 12 weeks followed by a 6-week washout period. A neurocognitive battery was administered at baseline, Week 12, and Week 18. Paired t tests compared groups at baseline, and multivariate analyses of covariance were used to assess between-group differences on primary outcome variables at Weeks 12 and 18. We enrolled 17 participants, and 14 completed the study. No between-group baseline differences were noted. The KD group demonstrated improved executive function and speed of processing at Week 12, which were negated after participants resumed their usual diets. Our study supports the potential efficacy of a KD for the treatment of HIV-associated neurocognitive impairment.