Adherence to highly active antiretroviral therapy (HAART) has been scarcely studied in correctional settings. Our study aims to evaluate the relationship between adherence and virological outcome and to determine factors related to adherence in correctional settings. A cross-sectional retrospective study was performed in Topas prison (Salamanca, Spain). 50 inmates starting HAART were studied. Adherence was estimated through a self-report questionnaire and variables related to adherence (covering individual factors, the illness itself and the therapeutic regimen) were recorded. HIVRNA levels and CD4 lymphocyte count were measured before starting therapy and six months after. Statistical analysis was performed using univariate and multivariate methods. 21 inmates (42%) were considered adherent and 29 (58%) were non-adherent. Adherence to treatment, as measured by our questionnaire, was the only significant and independent factor associated with an undetectable viral load at six months of therapy. Five variables were significantly associated with adherence to treatment, four of them as predictor factors for good adherence: an active occupation inside prison, the absence of HIV-related symptoms, a good or average acceptance of treatment, and a higher academic background; previous injection drug use as a risk factor for HIV transmission was associated with non-adherence. A simple self-report questionnaire may be useful for assessing adherence in prison inmates. Recognizing variables associated with adherence is essential to identify prisoners at high risk of being non-adherents in order to develop strategies for improving compliance.