The earthquake, which had a magnitude of 5.0, struck at 9.19am on Wednesday (1219 AEDT), and the epicentre was located 270 kilometres northeast of Shanghai, the US Geological Survey said.
The quake occurred at a depth of 18.5 kilometres, it said.
There were no immediate reports of casualties or damage, but many people in downtown Shanghai reported feeling the tremor on Twitter and other microblogging sites.