The present invention relates to a new pharmaceutical composition containing a combination of 5-aminosalicylic acid and nicotinamide or related compounds. The combination is believed to beneficially influence the intestinal microbiota and/or reduce gastrointestinal inflammation. In certain embodiments, the pharmaceutical composition is partially or entirely released into the small intestine or large intestine.