Hyponatremia, a prevalent electrolyte imbalance among tumor patients, has often been overlooked regarding its prognostic significance for immunotherapy. In this study, we delved into the prognostic ramifications of hyponatremia in advanced gastric cancer (AGC) patients undergoing immunotherapy. Enrolling AGC patients diagnosed between December 2014 and May 2021, we extracted pertinent data from electronic medical records, with a median follow-up of 35.8 months. Kaplan-Meier curves illuminated patients' progression-free survival (PFS) and overall survival (OS), while survival disparities were tested using the Mantel-Haenszel log rank test. COX and logistic regressions were employed to scrutinize the correlation between serum sodium levels and prognosis in 268 AGC patients, both at baseline and during treatment. Notably, patients with hyponatremia exhibited shorter PFS (4.7 vs 2.1 months, p = .001*) and OS (12.5 vs 3.9 months, p < .001*). Serum sodium emerged as an independent prognostic factor for both PFS (HR = 1.773; 95% CI 1.067-2.945; p = .001*) and OS (HR = 1.773; 95% CI 1.067-2.945; p = .003*). Subgroup analysis revealed that AGC patients with hyponatremia derived no benefit from immunotherapy in terms of PFS and OS. Strikingly, a decrease in serum sodium during immunotherapy was associated with early relapse and mortality. Based on these findings, we hypothesize that hyponatremia portends poor prognostic outcomes in AGC patients treated with immunotherapy and may serve as a valuable prognostic biomarker. However, further large-scale prospective studies are warranted to validate these observations.