Remove all the furniture in the room. Rent a carpet steam cleaner from a local hardware store. This is less expensive than renting a commercial cleaner or buying one.
Steam clean the carpet according to the manufacturer's instructions. Let the carpet air dry.
Mix carpet dye in a bucket with hot water. Follow the instructions on the package for dilution rates and water temperature. Use a candy thermometer to monitor the water temperature if necessary.
Apply the dye to the carpet with a paintbrush, starting in the corner farthest from the door and painting yourself out of the room. Move the brush back and forth as you paint the dye onto the carpet so it works down the entire fiber.
Set the temperature in the room for 70 degrees Fahrenheit or warmer. Let the carpet dye dry for 24 hours.
Set the dye by steaming the carpet with the steam cleaner. Let the carpet air dry.