In Budapest, the capital of Hungary, one of the most important tuberculosis related risk factors is homelessness. The aim of this retrospective study was the genetic characterization of Mycobacterium tuberculosis strains isolated from 66 homeless tuberculosis patients by spoligotyping and mycobacterial interspersed repetitive unit (MIRU) typing. The study identified a local microepidemy in the district with the highest tuberculosis incidence of Budapest. Further genetic characterization has shown that the microepidemy was due to a locally emerged Budapest-specific lineage of M. tuberculosis. These data may serve as a reference to better monitor and understand the patterns and transmission dynamics of tuberculosis in this at-risk population and is the first report on genetic diversity of M. tuberculosis in today's Hungarians. The findings also indicate that tuberculosis control and prevention steps among the homeless need to be strengthened.