The first fossil register of C. megalodon is from the Late Oligocene, Rupelian stage, about 28 My ago.
The last confirmed evidence of a living megalodon is a fossil tooth, dated aprox. 1.5 million years, during the Calabrian stage of the Pleistocene epoch, in the present Quaternary era.
This monstruous shark species (the largest shark paleontologists belive have ever existed in the oceans) was an extremely successful species, living as an apex predator for almost 30 million years, a very rare occurence in life evolution on Earth.
Species (either marine or dry land), in average, become extinct within 10 million years of its first appearance.
This is specially true when we are dealing with apex predators in the top of the food chain, which are usually more vulnerable to climate changes and food supply than other species.