Nonsteroidal anti-inflammatory drugs (NSAIDs), which are globally prescribed, exhibit mainly anti-inflammatory and analgesic effects but also can cause adverse effects including gastrointestinal erosions, ulceration, bleeding, and perforation. The purpose of this study was to investigate surrogate biomarkers associated with the gastrointestinal (GI) damage caused by NSAID treatment using pattern recognition analysis of 1H-nuclear magnetic resonance (1H NMR) spectra of rat urine. Urine was collected for 5 h after oral administration of the following NSAIDs at low or high doses: acetylsalicylic acid (10 or 200 mg kg−1), diclofenac (0.5 or 15 mg kg−1), piroxicam (1 or 10 mg kg−1), indomethacin (1 or 25 mg kg−1), or ibuprofen (10, or 150 mg kg−1) as nonselective COX inhibitors and celecoxib (10 or 100 mg kg−1) as a COX-2 selective inhibitor. The urine was analyzed using 500 MHz 1H NMR for spectral binning and targeted profiling and the level of gastric damage was examined. The nonselective COX inhibitors caused severe gastric damage while no lesions were observed in the celecoxib-treated rats. The 1H NMR urine spectra were divided into spectral bins (0.04 ppm) for global profiling, and a total of 44 endogenous metabolites were assigned for targeted profiling. Multivariate data analyses were performed to recognize the spectral pattern of endogenous metabolites related to NSAIDs using partial least square-discrimination analysis (PLS-DA). The 1H NMR spectra clustered differently according to gastric damage score in global profiling. In targeted profiling, the endogenous metabolites of citrate, allantoin, 2-oxoglutarate, acetate, benzoate, glycine, and trimethylamine N-oxide were selected as putative biomarkers for gastric damage caused by NSAIDs. These putative biomarkers might be useful for predicting the risk of adverse effects caused by NSAIDs in the early stage of drug development process.