Background and study aims Ghrelin and leptin hormones have been well recognised as key factors in regulating appetite and energy homeostasis. Recently, it has been reported that both are produced in the stomach, but little is known about their influence on gastric mucosal integrity. Therefore, this study aims to compare the effects of subcutaneous (sc) administration of ghrelin and leptin on acute gastric ulcer induced by immobilisation stress. Materials and methods The study was carried out on 36 adult male albino rats. The animals were divided into four main groups: group I (control group); group II (ghrelin-treated group, 40 μg kg –1 body weight (BW) sc), which was divided into two equal subgroups: group IIa (ghrelin alone) and group IIb (pretreated with nitro-l-arginine methyl ester ‘L-NAME’) (70 mg kg −1 BW sc); group III (leptin-treated group, 10 μg kg −1 BW sc), which was divided into two equal subgroups: group IIIa (leptin alone) and group IIIb (pretreated with L-NAME) (70 mg kg −1 BW sc); and finally group IV (treated with both ghrelin and leptin). In all the groups studied, ulcer score, ulcer index and preventive index were evaluated. Results sc administration of ghrelin or leptin produced a significant decrease in the ulcer score ( p < 0.001) and ulcer index, with an increase in the preventive index. Moreover, the combined treatment with both ghrelin and leptin induced a more protective effect than each one alone. In L-NAME-pretreated animals, the ulcer prevention ability of both ghrelin and leptin was significantly reduced ( p < 0.05). However, there was still a significant reduction in the ulcer score and ulcer index when compared with that of the control rats ( p < 0.05). Conclusion Both ghrelin and leptin play a protective role against stress-induced gastric ulcer and their combination effect is additive in nature. Furthermore, their effects proved to be mostly, but not completely, through nitric oxide pathway.