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.
More No Comment
Priest holds mass in basement of Ukraine church amid sounds of Russian shelling
50 couples get married in mass wedding ceremony in Brazil
No comment videos of the week
Residents inspect damage after huge fire in Manila
Ukrainian woman, 3 children survive house bombing
"Russian Hulk" sets world record by pulling three helicopters
37 years after massacre, families receive remains
An honorary Palme d'Or for Tom Cruise at the Cannes Film Festival
Feminist groups protest against femicides in Mexico
Ukrainian soldiers blow up bridge in Luhansk region
An American activist has been carrying his rubbish for a month.
Mass arrests in Armenia during anti-government protests
Middle school student in Afghanistan makes model vehicles from waste
Jewish pilgrimage begins at the Ghriba synagogue in Tunisia
Aussie PM crashes into child during football match on campaign trail