This study aimed to evaluate the effect of a heat wave on the milk yield of cows raised in a pasture-based system with access to an automatic milking system. The study was conducted at Embrapa Pecuária Sudeste, Brazil, using data from 32 days of milk from 68 dairy cows (Holstein x Jersey). The animals had free access to an AMS (DeLaval VMS300), located ~160 m around the pasture area. The microclimate data (air temperature, AT°C, and relative humidity, RH%) were recorded by automatic weather stations (15 min interval). So, we calculated the Black Globe-Humidity Index (BGHI) and determined the heat wave (HW) period. The HW was defined according to the TX90P index (maximum air temperature above the 90th percentile = 31.6 °C, for at least five consecutive days). For the HW, three different periods were defined: pre-heat wave (10 days), heat wave (12 days), and post-heat wave (10 days). Milk yield data were tested for normality using the Shapiro–Wilk test and analysed using a mixed linear model, considering the period as a fixed effect and the cow as a random effect. The highest average values of microclimate variables were found in the heat wave period (AT: 27.1°C; RH: 50.1%; and BGHI: 77) followed by the pre-heat wave period (AT: 22.1°C; RH: 77.9%; and BGHI: 73.5) and the post-heat wave period (AT: 22.2°C; RH: 67.8%; and BGHI: 72.7). A progressive reduction (p<0.001) in milk yield was observed across the periods (pre-heat wave: 17.6 ± 0.8; heat wave: 17.1 ± 0.8; post-heat wave: 16.1 ± 0.8 kg/day). The continued decline in milk yield during the post-heat wave period indicates that the physiological effects of hyperthermia extended beyond the end of the event, reflecting a slower productive recovery. Our results indicate that periods of heat waves compromise milk yield and that this effect persists even after normal thermal conditions are restored.