This study developed a two-dimensional heat path topology optimization method that minimizes the peak temperature inside motor slots. By representing the coil and varnish as a homogenized material, the problem was simplified to a two-phase topology optimization of the homogenized material and heat conductor. The motor performance was represented as a constraint on the magnetomotive force, which is related to the heating rate of the windings. Because the heating rate depends on the winding occupancy, we developed a new formulation for the sensitivity of the objective function. The heat path geometry was optimized without volume limitation under the trade-off relationship between the heat transfer efficiency and heat generation rate. The results indicated an 8.84% reduction in the peak temperature of a motor slot compared to that of a conventional simple aluminum plate.