The invention relates to a device and a method for heating a rock specimen under a triaxial pressure. The device consists of a triaxial pressure chamber furnace body, an axial pressure head, a confining pressure head, an upper pressure head, a lower pressure head, pressure-transmitting, heat-generating, insulating and heat insulation materials, a thermocouple, a traction trolley base, a triaxial pressure machine and a temperature control cabinet, wherein the triaxial pressure chamber furnace body is arranged on the traction trolley base; solid-particle pressure-transmitting materials, the thermocouple and heat-generating, insulating and heat insulation materials are arranged in a space encircled by the axial pressure head, the confining pressure head, the upper and lower pressure heads, the rock specimen and the inner wall of the triaxial pressure chamber furnace body; and water cooling copper pipes are distributed at the periphery of the triaxial pressure chamber furnace body. The triaxial pressure machine is used for pressurizing the axial pressure head and a confining pressure sleeve, adjusting the output current of the temperature control cabinet and changing the heat productivity of an electric heating alloy sheet; the heat passes through a piece of mica paper and is transmitted to the rock specimen; the thermocouple measures the ambient temperature of the electric heating alloy sheet in real time; and the temperature control cabinet displays and records the ambient temperature, compares the displayed temperature with the experimental fitted temperature, and adjusts the current to realize the controllable temperature of the rock specimen.