Your mind and body are linked together in a complex system of interactions, and sometimes the results can affect your digestive system. Stress and anxiety from nerves are a leading cause of diarrhea.
Most people have experienced nerves and anxiety, which triggers adrenaline - the fight, flight, fright hormone - among other chemicals. This in turn speeds up your nervous system, which can speed everything - including your intestines - up. And sometimes this can result in diarrhea.