Nonadherence to antiretroviral therapy (ART) may lead to viral replication and development of antiretroviral resistance. To identify the factors associated with nonadherence to ART among people living with the human immunodeficiency virus (HIV)/acquired immunodeficiency syndrome (AIDS) (PLWHA). Cross-sectional study in a tertiary-level hospital in northeastern Brazil. Intake of less than 90% of the antiretroviral drugs prescribed in the last week prior to the interview was defined as nonadherence. Intake was evaluated using a questionnaire. Descriptive and multivariate analyses were conducted on the study population, with estimation of the respective odds ratios and 95% confidence intervals. The prevalence of nonadherence was 28.4%. Significant associations were found regarding the following variables: age less than 35 years, smoking, sedentary lifestyle, lack of medication and lack of knowledge regarding the patient's HIV status, on the part of the patient's partner or family. Encouragement of adherence to antiretroviral therapy is one of the fundamental pillars of treatment for HIV-infected patients. The high proportion of nonadherence (28.4%) and the predictive factors related to this indicate that it is necessary to improve patients' adherence to antiretroviral therapy.