This is a widespread tropical tramp species, introduced throughout the world. Nests are found in the soil, under stones, fallen trees, tree bark and in other crevices. Its native range is unknown. It is ubiquitous in non-air conditioned dwellings anywhere in the lowland tropics. Regardless where you are, if you are sitting at a table with a sugar dispenser you are likely to see workers of T. melanocephalum running about on the surface. They always seem to be able to find their way into the sugar container, and sugar on tropical tables always contains some non-negligible fraction of T. melanocephalum workers. When you put a spoonful of sugar in your drink, you can judge the level of contamination by how many workers are left floating on the surface.
In quantitative biodiversity surveys, this species often has to be excluded from data analysis because the laboratory where samples are processed contains T. melanocephalum as a pest, and contamination of samples occurs.
Although most often found in houses, they can also move out into surrounding vegetation in highly disturbed and highly insolated habitats, opportunistically nesting in small plant cavities. Nests readily relocate, and overnight they can move into a shoe or an umbrella left on a porch.