Endometrial tuberculosis typically occurs as a secondary infection from a primary site, such as the lungs. The bacteria Mycobacterium tuberculosis can spread through the bloodstream or lymphatic system to the genital tract. Immunosuppressed individuals and those with a history of pulmonary tuberculosis are at higher risk.