BackgroundTo produce quality data that informs valid clinical trial results and withstands regulatory inspection, trial sites should adhere to many complex and dynamic requirements. Understanding non-conformance to requirements informs the emerging field of improvement science. We describe protocol deviations in South Africa’s largest HIV vaccine efficacy trial.MethodsWe analysed data from the HVTN 702 trial using mixed methods. We obtained descriptive statistics, from protocol deviation case report forms collected from 2016–2022, of deviation by participant, trial site, and time to site awareness. We thematically analysed text narratives of deviation descriptions, corrective and preventive actions, generating categories, codes and themes which emerged from the data.ResultsFor 5407 enrollments, 4074 protocol deviations were reported (75 [95% CI: 73.0–77.6] deviations per 100 enrolments). There was a median of 1 protocol deviation per participant (IQR 1–2). Median time from deviation to site awareness was 31 days (IQR 0–146). The most common category of deviation type was omitted data and/or procedures (69%), and 54% of these omissions were stated to have arisen because of the national lockdown at the beginning of the COVID-19 pandemic. The ratio of protocol deviations to cumulative enrolments was highest in the year 2020 (0.34). Major themes of deviations were: COVID-19 and climate disasters giving rise to deviation trends, subroutines introducing an opportunity for deviation, and document fragmentation (such as requirements dispersed across multiple guidance documents) as an obstacle. Preventive action categories were: no preventive measures; discipline, training and/or awareness; quality review, checking and verifying and changing the process and/or implementation tools. Major themes of preventive actions were that systems-based actions are unusual, with people-based actions dominating, and that root cause analysis was rarely mentioned.ConclusionsIn the age of infectious and climate disaster risks, trials may benefit from simple study designs and trial-related documents. To optimise protocol adherence, sponsors and sites should consider ongoing training, and routinely review deviation reports with a view to adjusting processes. These data quality lessons may inform future trial design, training and implementation.Trial registrationHVTN 702 was registered with the South African National Clinical Trials Register (DOH-27–0916-5327) and ClinicalTrials.gov (NCT02968849).Supplementary InformationThe online version contains supplementary material available at 10.1186/s12874-023-01967-9.