Intermediate-depth earthquakes1, at depths of 50–300 km in subduction zones, occur below the brittle–ductile transition, where high pressures render frictional failure unlikely. Their location approximately coincides with 600 to 800 °C isotherms in thermal models2, suggesting a thermally activated mechanism for their origin. Some earthquakes may occur by frictional failure owing to high pore pressure that might result from metamorphic dehydration2,3,4,5. Because some intermediate-depth earthquakes occur ∼30 to 50 km below the palaeo-sea floor6, however, the hydrous minerals required for the dehydration mechanism may not be present. Here we present an alternative mechanism to explain such earthquakes, involving the onset of highly localized viscous creep in pre-existing, fine-grained shear zones. Our numerical model uses olivine flow laws for a fine-grained, viscous shear zone in a coarse-grained, elastic half space, with initial temperatures from 600–800 °C and background strain rates of 10-12 to 10-15 s-1. When shear heating becomes important, strain rate and temperature increase rapidly to over 1 s-1 and 1,400 °C. The stress then drops dramatically, followed by low strain rates and cooling. Continued far-field deformation produces a quasi-periodic series of such instabilities.