The move, announced late Sunday, caused a run on grocery stores by residents who have become exasperated with authorities' inability to snuff out the outbreak despite nearly three weeks of increasingly disruptive measures.
Authorities are imposing a two-phase lockdown of the city of about 25 million people to carry out mass testing.
The government had sought to avoid the hard lockdowns regularly deployed in other Chinese cities, opting instead for rolling localised lockdowns to keep Shanghai's economy running.
But Shanghai has in recent weeks become China's Covid hotspot, and on Monday another record high was reported, with 3,500 new confirmed cases in the city.
The area locked down on Monday is the sprawling eastern district known as Pudong, which includes the main international airport and glittering financial centre.
The lockdown will last until Friday, then switch to the more populated western Puxi section, home to the historic Bund riverfront.
The government said the steps were being taken to root out infections "as soon as possible".
China has reported several thousand new daily cases for the past two weeks.
Those numbers remain insignificant globally but are up sharply from fewer than 100 a day in February.
Tens of millions of residents in affected areas across China have been subjected to citywide lockdowns in response.
Chinese authorities have watched nervously as a deadly Hong Kong Omicron surge sparked panic buying and claimed a high toll of unvaccinated elderly before later surging in mainland China.