The purpose of a current-limiting resistor in an LED circuit is to control the amount of current flowing through the LED. This is important because LEDs are sensitive to overcurrent and can be damaged if too much current passes through them. By using a current-limiting resistor, you can ensure that the LED operates within its safe operating limits and has a longer lifespan.