Technologies for improving the fuel economy of gasoline engines have been vigorously developed in recent years for the purpose of reducing CO2 emissions. Increasing the compression ratio is an example of a technology for improving the thermal efficiency of gasoline engines. A significant issue of a high compression ratio engine for improving fuel economy and low-end torque is prevention of knocking under a low engine speed. Knocking is caused by autoignition of the air-fuel mixture in the cylinder and seems to be largely affected by heat transfer from the intake port and combustion chamber walls. In this study, the influence of heat transfer from the walls of each part was analyzed by the following three approaches using computational fluid dynamics (CFD) and experiments conducted with a multi-cooling engine system. First, the temperature rise of the air-fuel mixture by heat transfer from each part was analyzed. Heat transfer from the intake port and cylinder head was found to be higher than that from other parts due to the high flow velocity during the intake stroke. Therefore, lowering the temperature of the intake port and cylinder head would be effective for cooling the air-fuel mixture. Next, the influence of hot spots, produced by sharp edges and conventionally said to be a cause of knocking, was analyzed by using laser-induced phosphorescence thermography of the piston surface under a low engine speed. The results showed that the wall temperature of the piston surface immediately after combustion was 30 K higher than the average temperature, although at the time of ignition in the next cycle, the wall temperature was the same as the average temperature and hot spots at sharp edges were not observed. Therefore, sharp edges do not affect knocking at low engine speeds. Thirdly, the effect of squish on knocking was analyzed by CFD and engine experiments. It was found that the thermal boundary layer accounted for a large portion of the squish zone at top dead center. Unburned air-fuel mixture near the squish zone increased heat transfer from the squish zone by reverse squish flow, thereby reducing the temperature of the unburned air-fuel mixture near the squish zone. This insight can be incorporated in the combustion chamber design and used effectively for preventing knocking. Significant parameters for combustion design were made clear by elucidating these three mechanisms.