Adolescent girls and young women in southern and eastern Africa have adherence challenges with daily oral HIV pre-exposure prophylaxis (PrEP). High adherence is most important during periods of HIV risk (prevention-effective adherence). We aimed to describe HIV risk behaviour and to understand patterns in PrEP adherence during periods of risk among adolescent girls and young women from sub-Saharan Africa. We did a secondary analysis of the HPTN 082 trial, an open-label, interventional, randomised controlled trial of sexually active adolescent girls and young women (aged 16-25 years) testing negative for HIV in Johannesburg and Cape Town, South Africa, and in Harare, Zimbabwe. The primary outcomes were high cumulative PrEP adherence, dichotomised as intracellular tenofovir diphosphate concentrations of at least 700 fmol/punch in dried blood spots at weeks 13, 26, and 52, and high recent PrEP adherence, dichotomised as plasma tenofovir concentrations of at least 40 ng/mL at weeks 13, 26, and 52, among participants who accepted PrEP. We collected data on sexual behaviour every 3 months. We categorised visits into a binary variable of any HIV risk based on condomless sex, more than one sexual partner, primary partner's HIV status and antiretroviral use, transactional sex, drug or alcohol use around sexual activity, and laboratory-diagnosed STIs. We used generalised estimating equations to evaluate associations between HIV risk (reflecting behaviour during the previous 3 months) and high cumulative and recent adherence to PrEP and any PrEP use (quantifiable drug concentrations). The trial is registered with ClinicalTrials.gov, NCT02732730. Between Oct 12, 2016, and Oct 25, 2018, 451 women were recruited, and 427 participants (median age 21·0 years [IQR 19·0-22·0]) were eligible for inclusion in this analysis. The proportion of participants reporting at least one HIV risk factor decreased significantly over follow-up, from 364 (85%) participants at enrolment, 226 (60%) at week 13, and 243 (65%) at week 26, to 224 (61%) at week 52 (p<0·0001). Any HIV risk was significantly associated with high PrEP adherence, measured by both tenofovir diphosphate concentrations of at least 700 fmol/punch (adjusted relative risk 1·57 [95% CI 1·09-2·25]; p=0·014) and plasma tenofovir concentrations of at least 40 ng/mL (1·36 [1·11-1·65]; p=0·0025). Any HIV risk was also associated with quantifiable concentrations of tenofovir diphosphate (1·15 [1·03-1·29]; p=0·013) and tenofovir (1·27 [1·09-1·49]; p=0·0022). We observed significant dose-response relationships between number of HIV risk factors and PrEP drug concentrations. The association between any HIV risk and high PrEP adherence suggests that adolescent girls and young women were able to use PrEP during periods of risk, an indicator of prevention-effective PrEP adherence. Our findings support a shift in the PrEP framework to acknowledge prevention-effective adherence practices, which might improve PrEP delivery and adherence support for adolescent girls and young women in HIV-endemic settings. US National Institutes of Health.