Put on a pair of gloves to prevent any bacterial transfer from the feces. Scoop up as much of the poop as possible and discard. Scoop up the poop with various tools such as small shovel, a dustpan, paint scraper or large spatula.
Create a mixture of cold water with a few drops dishwashing liquid. Dip a cleaning sponge or brush into the cleaning mixture and apply to the carpet. Gently scrub at the stain, moving in a circular motion. Repeat until the stain appears to be gone. You may also wish to use a carpet cleaning solution designed for pet owners, which you can purchase at most grocery stores, hardware stores or home repair stores.
Gently blot the wet area with towels or paper towels. When dry, pour a small amount of baking soda over the area and allow it to sit for a few hours, which will help remove any lingering odors.
Vacuum up the baking soda. Repeat as necessary until there is no noticeable odor.