Phylogenetic analyses of HIV are an increasingly accurate method of clarifying population-level patterns of transmission and linking individuals or groups with transmission events. Viral genetic data may be used by public health agencies to guide policy interventions focused on clusters of transmission or segments of the population in which transmission is concentrated. Analyses of HIV phylogenetics in high-income countries have often found that clusters of transmission play a significant role in HIV epidemics. In sub-Saharan Africa, HIV phylogenetic analyses to date suggest that clusters of transmission play a relatively minor role in local epidemics. Such analyses could nevertheless be used to guide priority setting and HIV public health programme design in Africa for sub-populations in which transmission events are more concentrated. Phylogenetic analysis raises ethical issues, in part due to the range of potential benefits and potential harms (ie, risks). Potential benefits include (1) improving knowledge of transmission patterns, (2) informing the design of focused public health interventions for subpopulations in which transmission is concentrated, (3) identifying and responding to clusters of transmission, (4) reducing stigma (in some cases) and (5) informing estimates of the (cost-)effectiveness of HIV treatment programmes. Potential harms include (1) privacy infringements, (2) increasing stigma (in some cases), (3) reducing trust in public health programmes, and (4) increased prosecution of legal cases where HIV transmission, homosexuality or sex work is criminalised. This paper provides analysis of relevant issues with a focus on sub-Saharan Africa in order to inform consultations regarding ethical best practice for HIV phylogenetics.