An earthquake of magnitude 4.2 hit Afghanistan on Monday morning, said the National Center of Seismology.