Objective. The neutrophil–lymphocyte ratio (NLR) and platelet–lymphocyte ratio (PLR) demonstrate good diagnostic accuracy in distinguishing lung cancer patients from healthy individuals, primarily in HIV-negative populations. We determined the sensitivity (Se), specificity (Sp), and area under the curve (AUC) of the NLR and PLR in discriminating between people living with HIV (PLWH) with and without lung cancer. Methods. This is a comparative analysis of secondary data. Cases were PLWH with lung cancer from a retrospective cohort treated at the Uganda Cancer Institute. Controls were unmatched PLWH without lung cancer who were randomly selected from three HIV clinics in Uganda. Se, Sp, and AUC analysis and determination of optimal cutoffs were performed using receiver operating characteristic (ROC) curves. Results. Of 115 PLWH (18 cases and 97 controls), 83 (72.2%) were female, 110 (95.7) were on ART, and the median (IQR) age was 46 (38–51) years. The median (IQR) NLR was higher among cases than controls (3.53 (3.14–7.71) vs. 0.92 (0.67–1.09), p <0.001). Similarly, the PLR was higher among cases than controls (237.5 (177.8–361.6) vs. 123.6 (100.6–155.4), p=0.001). At a cutoff of 2.44, the respective Se, Sp, and AUC of the NLR were 87.5% (95% CI: 61.7%–98.4%), 100% (95% CI: 96.2%–100%), and 0.94 (95% CI: 0.85–1.00, p <0.001). Similarly, the respective Se, Sp, and AUC for the PLR were 75% (95% CI: 47.6%–92.7%), 87.2% (95% CI: 78.8%–93.2%), and 0.81 (95% CI: 0.70–0.93, p <0.001) at a cutoff of 196.3. Conclusion. The NLR and PLR discriminated PLWH with and without lung cancer and could be useful in PLWH with respiratory symptoms in whom lung cancer can easily be misdiagnosed as other lung pathology.