Glycopyrrolate is used with other drugs to treat a certain type of stomach/intestinal ulcer (peptic ulcer). This medication may help relieve stomach/abdominal pain. However, it has not been shown to be effective in healing these ulcers, preventing them from returning, or preventing other problems caused by ulcers. Glycopyrrolate works by decreasing the amount of acid in the stomach. It also slows the natural movements of the gut and relaxes the muscles in the stomach/intestines. Glycopyrrolate belongs to a class of drugs known as anticholinergics.