The thymus is the primary lymphoid organ supplying new lymphocytes to the periphery. Clinical and morphologic studies of HIV-infected children and adults indicate that the thymus is affected by HIV. Thymic dysfunction and thymic involution occur during HIV disease and have been associated with rapid progression in infants infected perinatally with HIV. In vitro information of thymic organ culture, thymic epithelial cell culture, the SCID-hu mouse system and SHIV infection of primates have supported HIV-induced thymic damage. The mechanisms underlying this could be many, including direct thymocyte killing by the virus, apoptosis, or disruption of thymic stromal architecture. T cell receptor excision circles (TREC) have been developed as a marker of new thymic emigrants. Decreases in TREC concentrations have been found in both HIV-infected pediatric and adult patients. Mathematical models have suggested that thymic infection in children is more severe than in adults, particularly during infection with strains that use CXCR4 as coreceptor. Recent evidence suggests that thymic recovery may be achieved in some patients as a result of potent antiretroviral therapy. Extensive thymic damage may, however, hamper immune reconstitution, particularly in pediatric patients. This review attempts to summarize evidence for thymic involvement during HIV infection in children and in adults, the role of thymic infection in disease progression, and the contribution of the thymus to immune restoration following potent antiviral therapy. Immunologic interventions aiming at restoring thymic function in AIDS patients are also reviewed.