Our study aimed to describe the transmission dynamics and genotypic diversity of Mycobacterium tuberculosis in people deprived of liberty (PDL) in four Colombian prisons. Our cohort study included 64 PDL with bacteriologically confirmed pulmonary tuberculosis diagnosed in four Colombian prisons. The 132 isolates were genotyped using 24-mycobacterial interspersed repeated units-variable number tandem repeats (MIRUs-VNTR). A cluster was defined when ≥2 isolates from different PDL had the same genotype. Tuberculosis acquired in prison was considered when ≥2 persons were within the same cluster and had an epidemiological link. We mapped the place of residence before incarceration and within prisons. We assessed overcrowding and ventilation conditions in the prison that had clusters. We found that the most frequent genotypes were LAM (56.8%) and Haarlem (36.4%), and 45.3% of the PDL diagnosed with tuberculosis were clustered. Most PDL diagnosed in prison came from neighborhoods in Medellin with a high TB incidence. M. tuberculosis infection acquired in prison was detected in 19% of PDL, 9.4% had mixed infection, 3.1% reinfection, and 1.6% relapse. Clusters only appeared in one prison, in cell blocks with overcrowding >100%, and inadequate ventilation conditions. Prisons require the implementation of effective respiratory infection control measures to prevent M. tuberculosis transmission.