Just like grass, mud is one of the most common carpet stains. Brush or scrape off as much as possible as soon as you discover a mud stain or muddy footprint on your carpet. You can use a vacuum cleaner to quickly remove the mud particles from deep within the fibres.
Once that’s done, let the mud dry and vacuum again to remove any you missed when it was wet. Then use a mixture of washing up liquid and warm water with a soft cleaning cloth to blot the stain until all the liquid and stain is absorbed and removed from the carpet. Repeat until the stain is entirely removed.