Cleaners Fitzrovia advise that the first step to effectively dealing with mud stains to rely more on a set of preventive measures. Buy a doormat, on which everybody will be forced to wipe their feet or buy a small carpet right in front of the door, where all dirty shoes will be taken off and remain there. But you can never expect for these to work all the time. It takes one accident to leave your carpet in a mess.
When dealing with a mud stain, the first thing you have to do is to remove any pressure on the area as that may speed the process setting in the carpet fibre. Now the best thing to do is to leave it to dry completely and then return with a small knife and scrape the topmost layer of mud, so that you have a lot less to clean. Then vacuum the area to suck as much of the loose mud as possible. If the stain is mild, then these will be sufficient to remove it, but should it persist cleaners Fleet Street advise to try to clean the stain with an aerosol carpet shampoo and treat the area.
Once the spot has dried, you should do another quick vacuum and be done with it.