You are experiencing problem known as fecal incontinence, or impaired bowel control ( loss of voluntary control of stool, or bowel movements), that results in unexpected leak of stool, gas or mucus from the anus.
There are different grades or cases with different intensity of impaired bowel control.
You are probably having a milder case, since the leakage isn't a stool, probably just a mucus, and you have it only provoked by walking.
Actually, this condition can vary from being partial, in which a person loses only a small amount of liquid waste, to complete, in which the entire solid bowel movement cannot be controlled.
The skin around the anus is delicate and sensitive, and contact between skin and stool or mucus can cause pain or itching.
Whenever a rectral dysfunction is present with walking, a spinal cord should be investigated for posibble disc hernia.
There are different cause for this condition, and you should see a gastroenterologist as soon as posibble.
Best wishes!
Marija