The Staphylinidae are one of the largest (over 46,000 species) and most easily recognisable of the commonly accepted beetle 'families'. Among other things, they can be readily distinguished from other beetles by the reduction of the elytra so that they no longer cover the abdomen, similar to what is seen in the earwigs. The most familiar staphylinids are relatively large predatory species (known as rove beetles or devil's coach-horses) but the family includes a wide variety of other forms.
The animal rather poorly illustrated at the top of the post is a member of the subtribe Termitusina in the subfamily Aleocharinae. Termitusina are found in tropical Africa where they live within the colonies of certain species of termite. The image doesn't show the distinguishing features of this group very well, unfortunately, but if you look carefully (and perhaps use a bit of imagination) you may be able to make out the strongly deflexed head and ninth abdominal tergite divided between two elongate halves. Unlike many termite-associated staphylinids, Termitusina of the genera Termitusa and Thoracotusa do not generally exhibit physogastry (a swollen abdomen). Termitusodes, the third genus in the subtribe, differs from the other two genera in this respect, though it still comes nowhere near the level of physogastry found in some termite-associated staphylinids.
I haven't been able to find out whether the Termitusina are in some way social parasites of their host termites or whether they are finding their food in the nest some other way (such as by scavenging or feeding on fungi) but the association is undoubtedly a close one. Termitusina are, as a rule, host specific (Jacobson & Kistner, 1975). Termitusa are found only in nests of the termite genera Cubitermes and Noditermes, Thoracotusa is found with Thoracotermes, and Termitusodes has been found with Cubitermes and Pericapritermes magnificus. Pericapritermes often nest in association with Cubitermes (they may occupy abandoned Cubitermes nests or they may invade the nest while the Cubitermes are still living there) and it seems likely that this association is what allowed Termitusodes to change hosts at some point in its history.
REFERENCES
Jacobson, H. R., & D. H. Kistner. 1975. Numeric analyses of relationships of genera and species of the subtribe Termitusina (Coleoptera: Staphylinidae). Systematic Zoology 24 (2): 191-198.
Seevers, C. H. 1957. A monograph on the termitophilous Staphylinidae (Coleoptera). Fieldiana: Zoology 40: 1-334.