Prosthetic joint infection (PJI) is one of the most devastating complications in orthopedic surgery. One approach used to prevent PJI is local antibiotic therapy. This study evaluates the antibiotic release, in vitro cytocompatibility and in vivo effectiveness in preventing PJI caused by Staphylococcus aureus (S. aureus) of the fluorine‐ and phosphorus‐doped, bottle‐shaped, nanostructured (bNT) Ti–6Al–4V alloy loaded with a mixture of gentamicin and vancomycin (GV). We evaluated bNT Ti–6Al–4V loading with a mixture of GV, measuring the release of these antibiotics using high‐performance liquid chromatography. Further, we describe bNT Ti–6Al–4V GV cytocompatibility and its efficacy against S. aureus using an in vivo rabbit model. GV was released from bNT Ti–6Al–4V following a Boltzmann non‐linear model and maximum release values were obtained at 240 min for both antibiotics. The cell proliferation of MCT3T3‐E1 osteoblastic cells significantly increased at 48 (28%) and 168 h (68%), as did the matrix mineralization (52%) of these cells and the gene expression of three of the most important markers related to bone differentiation (more than threefold for VEGF and BGLAP, and 65% for RunX) on bNT Ti–6Al–4V GV compared with control. In vivo study results show that bNT Ti–6Al–4V GV can prevent S. aureus PJI according to histopathological and microbiological results. According to our results, bNT Ti–6Al–4V loaded with a mixture of GV using the soaking method is a promising biomaterial with favorable cytocompatibility and osteointegration, demonstrating local bactericidal properties against S. aureus. © 2019 Orthopaedic Research Society. Published by Wiley Periodicals, Inc. J Orthop Res 38:588–597, 2020