Formation water represents an important driving force and carrier for the migration and accumulation of oil and gas; thus, research on its origin is a hot spot in petroleum geology. The Upper Triassic Xujiahe Formation in the Xiaoquan-Fenggu Structural Belt in the western Sichuan Depression, China, has developed thick tight sandstone gas reservoirs. However, previous studies have provided different conclusions on the origin of the formation water in the Xujiahe tight sandstone reservoir. In this paper, the origin of the formation water in the Xujiahe Formation was determined based on the latest major and minor elemental concentration data, hydrogen and oxygen isotopes data of formation water, and carbon and oxygen isotope data of carbonate cements. The results show that the salinity of the formation water of the Xujiahe Formation in the study area is generally greater than 50 g/L. The water type is mainly the CaCl2 type, although a small proportion of NaHCO3 type water with high salinity is observed, which is related to hydrocarbon expulsion by overpressure. Moreover, the formation water in the sandstone of the Xujiahe Formation is obviously rich in Br, which is related to membrane infiltration, overpressured hydrocarbon expulsion of shale and diagenesis of organic matter. The composition of Cl− and Na+ ions in the formation water in the Xujiahe tight sandstone reservoir is consistent with the seawater evaporation curve, which deviates significantly from the freshwater evaporation curve. The hydrogen and oxygen isotopes of condensate water in the Xujiahe Formation tight sandstone are similar to those of atmospheric precipitation water, while the hydrogen and oxygen isotopes of the formation water in the Xujiahe Formation show that it is of seawater origin. Therefore, to use hydrogen and oxygen isotopes to determine the origin of formation water, condensate water must be accurately differentiated from formation water. Otherwise, if the condensate water is misjudged as formation water, then incorrect conclusions will be drawn, e.g., that the formation water of the Xujiahe Formation originated from fresh water. Affected by organic carbon, the carbon isotope Z value of the carbonate cements in the Xujiahe Formation is low (mainly distributed between 110 and 130). A Z value of less than 120 does not indicate that the ancient water bodies formed by cements were fresh water or mixed water bodies. However, Z values greater than 120 correspond to a formation temperature lower than 80 C, which indicates that carbonate cement was not affected by organic carbon; thus, the Z value can reflect the origin of ancient water bodies. The results of this study indicate that the formation water of the Xujiahe tight sandstone in the study area is of seawater origin. The determination of the origin of the formation water and seawater of the Xujiahe Formation provides strong evidence for the determination of the marine sedimentary environment of the Xujiahe Formation in the study area, and can provide scientific guidance for the search for high-quality reservoirs.