Being omnivorous, it feeds on nuts, berries, and roots, as well as carrion and meat. One of its main staples is insects, which it removes from rotting stumps and trees with its long, hairless snout. Otherwise, it rarely kills animals. The sloth bear is sympatric with the leopard.
The Sri Lankan sloth bear is highly threatened, with a population less than 1000 (the wild population may be as few as 500) in many isolated populations with population decrease. Destruction of dry-zone natural forest is its main threat, because unlike other large Sri Lankan animals, the Sri Lankan sloth bear is highly dependent on natural forests for its food source.