The tests - which used the elephant's poo! - revealed that they became separated from other elephants around 300,000 years ago.
They ended up on the Malaysian island of Borneo.
In time, they developed different characteristics from their cousins.
They have larger ears, longer tails and straighter tusks than Asian elephants.
Hot-tempered
They're also said to be less hot-tempered than African and Asian elephants.
Scientists compared DNA from the pygmy elephants with that from elephants from Sri Lanka, Bhutan, Bangladesh, Thailand, Laos, Vietnam, Cambodia and Sumatra.
Wildlife groups say there are only about 1,000 pygmy elephants left in the world, and that everything must be done to stop them from dying out.