Tuberculosis (TB) is a communicable disease caused by Mycobacterium tuberculosis (Mtb) and is a major cause of morbidity and mortality. Successful treatment requires strict adherence to drug regimens for prolonged periods of time. Long-acting (LA) delivery systems have the potential to improve adherence. Here, we show the development of LA injectable drug formulations of the anti-TB drug rifabutin made of biodegradable polymers and biocompatible solvents that solidifies after subcutaneous injection. Addition of amphiphilic compounds increases drug solubility, allowing to significantly increase formulation drug load. Solidified implants have organized microstructures that change with formulation composition. Higher drug load results in smaller pore size that alters implant erosion and allows sustained drug release. The translational relevance of these observations in BALB/c mice is demonstrated by (1) delivering high plasma drug concentrations for 16 weeks, (2) preventing acquisition of Mtb infection, and (3) clearing acute Mtb infection from the lung and other tissues.