Authorities advise people to avoid outdoors with temperatures expected to remain high for next 8-10 days.
Some 185 red alerts were issued for northern and eastern China, including Beijing, the nearby city of Tianjin and the provinces of Hebei and Shandong, on Friday morning.
It is the first time since 2014 that the red alert has been used in Beijing, home to nearly 22 million people, according to government weather services.
The temperature in the capital was hovering at about 40 degrees Celsius (104 degrees Fahrenheit), after reaching a June record of 41.1C (106F) on Thursday.
The previous June high dated from June 10, 1961, when the temperature hit 40.6C (105F).
Beijing residents are accustomed to sweltering summers but temperatures across China have been unusually high in recent months, with scientists saying the heat is being exacerbated by climate change.
“This weather is not human and it is only the month of June!” wrote one user on the Chinese messaging platform Weibo, echoing numerous other posts.
On the streets of Beijing, pedestrians were seen wearing masks, hats and visors to protect themselves from the sun.
Along the city’s canals, some sought an escape from the heat by splashing around in the water.
In the coastal province of Shandong, which borders the Yellow Sea, the temperature reached 43C (109F) on Thursday, according to China’s meteorological service.
Local media reported that 17 weather stations around the region broke temperature records.
The China Meteorological Administration said on Thursday that it expected high temperatures to persist across much of the country’s north for the next eight to 10 days.
Local authorities on Friday warned the extended period of high temperatures could be a danger to health and advised people to limit their time outdoors and drink at least 1.5 litres of water every day.