A catastrophic heatwave strikes North America (NA) in summer 2021, the underlying mechanism of which remains unclear yet. The reanalysis data (1980-2021) is analyzed to elucidate the mechanism modulating the summer heatwaves. We find the heatwaves over western NA tend to occur concurrently with quasi-barotropic ridges (QBTRs). The 2021 record-breaking heatwave, in particular, coincides with an extended eight-day QBTR event. The frequency of QBTRs is modulated by large-scale forcing. During the period of 1980-2000, it is correlated with the Arctic Oscillation. After 2000, however, the QBTR frequency is highly associated with sea ice variations. Specifically, the negative sea ice anomalies in the Chukchi Sea is usually associated with stronger net surface shortwave radiation and low cloud cover, triggering upward motion and a low-pressure center in the low- and mid-troposphere. The low pressure strengthens a stationary wave response, concomitant with two alternately high- and low-pressure centers, inducing more frequent QBTRs over western NA. These findings indicate that further Arctic sea ice loss under a warming climate will likely lead to more devastating heatwaves over western NA.