This study aims to develop innovative heterocyclic nanocomposites incorporating silver nanoparticles (SNPs) for potential therapeutic applications targeting infections, gastric ulceration, inflammation, and oxidative damage. By synthesizing new derivatives of spiro-thiazolidine-carbonitrile (Py-ST-X) and incorporating them into Ag nanoparticles (AgNPs) and carbon nanotubes (CNTs), we have prepared Ag@Py-ST-X and Ag@Py-ST-X@CNT nanocomposites, respectively. The physical properties of these materials were studied using XRD, TEM, SEM, and Zeta potential techniques. In our investigation involving rats with gastric ulcers, we observed noteworthy inhibitory effects on gastric acid enzyme activity, specifically H+/K+ATPase, by Ag@Py-ST-NO2 and Ag@Py-ST-Br nanocomposites, demonstrating reductions of 25 and 34%, respectively, compared to untreated ulcers. Nanotubulation of these compounds further improved their inhibitory efficacy to 29 and 45%, respectively. Additionally, these nanoparticles showed the most potent myeloperoxidase (MPO)-inhibitory activity, demonstrating 36 and 49% inhibition, respectively, with nanotubulated versions reaching 44 and 53%. Moreover, Ag@Py-ST-NO2@CNT and Ag@Py-ST-Br@CNT nanotubes showed significant antioxidant activity, reducing thiobarbituric acid reactive substances (TBARS) by 35 and 51%, and hydrogen peroxide (H2O2) levels by 49 and 71%, respectively. These therapeutic effects were confirmed by reductions in gastric surface area (GSA) by 44% and 52%, a decrease in ulcer index (UI) from 80% to 44 and 38%, and an increase in curative index (CI) from 19 to 55 and 62% following administration of Ag@Py-ST-NO2@CNT and Ag@Py-ST-Br@CNT, respectively. Histological studies support these findings, suggesting the potential of these nanocomposites as promising candidates for treating various disorders.