An automatic system based on thermoelectric cooler (TEC), a microfan, and microcontroller is first applied to thermal management of high-power light-emitting diodes (LEDs). Its hardware is composed of microcontroller as a control core, K-type thermocouples as acquisition devices, and TEC and a microfan with heatsink as cooling vehicles. The experiment confirms that the LEDs substrate temperature can be controlled effectively, and indicates that the LED chips are operating reliably. Specifically, in high-temperature environments of 43 degrees C, the system can automatically drop to the low set temperature (30 degrees C) due to thermoelectric effect driven by TEC. Heat transfer analysis shows that maximum LED power cooled by the system is 106.7 W, and the total power consumption of the automatic cooling system is only 8.85 W. The automatic cooling system has a high cooling efficiency.