One of the most fascinating events in evolutionary history is the divergence of whales from terrestrial mammals during the Eocene. Recent DNA studies indicate that modern whales and dolphins evolved from ancestral artiodactyls, the even-toed ungulate family of cows, pigs, hippos, deer and camels.
Early in the Eocene, about 50 million years ago, the artiodactyls were represented by a hoofed, dog-like mammal. Within 5 million years, a branch of this family evolved into alligator-shaped, amphibious mammals that lived along the coast of Africa and southern Asia. By 40 million years ago, this group had become totally aquatic and looked like elongated dolphins. During this ten million year evolution, the nostrils migrated from the tip of the nose to the top of the head, the tail became incorporated into the body, the forelegs became fins, the hind legs were reduced and internalized and, by the end of the Eocene, horizontal flukes developed.
As the Eocene gave way to the Oligocene, 38 million years ago, these ancestral cetaceans spread throughout the oceans, soon diverging into the toothed whale and dolphin families.
Baleen whales, which feed by filtering krill and plankton from the ocean waters, would evolve from their toothed cousins in the mid Miocene, some 16 million years ago.