The coupling of the electrocaloric effect in thin films with thermal switches has the potential to be used for efficient refrigeration. We studied the unsteady heat transfer performance and periodic thermal-switching behavior of a flat heat pipe to transfer cold energy from a changing heat source. The condenser of the flat heat pipe was the changing heat source and changed from -20 W to +20 W every 5 s. The temperature of the condenser surface changed in accordance with the heat generation of the heat source. The evaporator was a plate with a mesh wick attached to a water-flow pipe. Cold energy transferred from the condenser surface to the evaporator surface only when the temperature of the condenser surface was lower than that of the evaporator surface. We analyzed the unsteady temperature change and heat transfer performance of the flat heat pipe by numerical simulation. The analytical results showed that it was necessary to have two thermal switches to separate the heat energy and cold energy of the changing heat source. Also, it was important to reduce the thermal resistance and heat capacity of the evaporator surface to improve the unsteady heat transfer performance of the heat pipe. Next, we measured the unsteady heat transfer performance of the flat heat pipe experimentally. The experimental results showed that the thermal-switching behavior was observed when the heat generation of the heat source changed every 5 s.