Abstract Background The mortality rate of patients with unresectable gastric cancer (UGC) has decreased with the development of chemotherapies and surgical techniques. However, the survival rate remains low. We retrospectively examined the prognostic significance of the pretreatment skeletal muscle mass index (SMI) and nutritional and inflammatory factors in patients with UGC. Methods This study included 83 patients diagnosed with UGC at Tottori University Hospital who received palliative chemotherapy based on 5-fluorouracil. Pretreatment computed tomography (CT) measured overall skeletal muscle mass (SMM) and cross-sectional SMM at the third lumbar vertebra (L3). We focused on the neutrophil-to-lymphocyte ratio (NLR), C-reactive protein-to-albumin ratio (CAR), prognostic nutritional index (PNI), and platelet-to-lymphocyte ratio (PLR) as nutritional and inflammatory factors. Results Receiver operating characteristic curve analysis was performed for median survival time (MST) after palliative chemotherapy. SMIs for males and females (43.9 cm2/m2 and 34.7 cm2/m2, respectively) were the cutoff values, and patients were divided into high (SMIHigh; n = 41) and low SMI groups (SMILow; n = 42). Body mass index (BMI) was significantly higher in patients in the SMIHigh group than in the SMILow group (p < 0.001). The number of patients who received third-line chemotherapy was significantly higher in the SMIHigh group than in the SMILow group (p = 0.037). The MST was significantly higher in the SMIHigh group than in the SMILow group (17.3 vs. 13.8 months; p = 0.008). The incidence of grade 3 or 4 side effects was significantly higher in patients with SMILow UGC (p = 0.028). NLR was significantly higher in patients with SMILow than it was in those with SMIHigh. (p = 0.047). In the univariate analysis, performance status, SMI, histological type, lines of chemotherapy, and NLR were prognostic indicators. The multivariate analysis identified SMI (p = 0.037), NLR (p = 0.002), and lines of chemotherapy (p < 0.001) as independent prognostic factors. Conclusions The SMILow group had significantly more grade 3 or 4 side effects, were related to high NLR, and had a significantly worse prognosis than the SMIHigh group. Trial registration Retrospectively registerd.