Sloths are related to armadillos and anteaters under the taxonomic group Xenarthra which means "foreign joints." we don't really know when Xenarthrans originally evolved, and their relationship with other mammals is unclear, but they're one of the more basal / ancestral groups of mammals