When you fart you poop, which is called fecal incontinence, may due to the following:
Loss of the ability to store (constipation) in the rectum.
Surgery, such as surgery for anal fistula or anal hemorrhoids
Injury to the muscle located at the end of the rectum
Constipation: This is due to chronic constipation causing fecal impaction, which is the accumulation of a large, dry mass of dry stool in the rectum
Injury to the existing nerve
In the rectum or in the nerves supplying the anal sphincter