Identifying the fate of contaminants (such as barium) during gas field produced water reinjection could be a feasible method to evaluate the environmental risks of the reinjection project and thus improve its sustainability. To assess the barium sorption behaviors during gas field produced water reinjected into sandstone reservoirs, a series of water–rock interactions experiments were conducted to systematically investigate the effects of brine/rock ratio (5:1~500:1), pH (3~10), temperature (20, 50 and 80 °C), brine salinity (NaCl solution, 0~100 g/L), competitive cations (Sr and Mg, 0.5 g/L), and organic compound (methanol, 0~5 g/L) on the sorption of barium in sandstone. The rock samples were collected from the Triassic formation of the Yanchang Group in the northern Ordos Basin, China. The results indicated that the sorption of barium in sandstone strongly depends on the brine/rock ratio. Under the same brine/rock ratio, the severity of the impact on the barium sorption from high to low was competitive cation, salinity, pH, temperature, and methanol concentration. The sorption process of barium onto the sandstone could be well fitted by a pseudo-second-order kinetics model. The presence of competitive cations would restrain the sorption of barium, while the existence of methanol hardly affects the barium sorption. The chloro-complexation reaction and the reduction of rock surface electrical potential are mainly responsible for the inhibition effects of NaCl salinity on barium sorption, and the corresponding relationship can be characterized by an exponential function. Barium sorption in sandstone decreases with increasing temperature, while it is positively correlated to the initial pH of the solution. The water-rock system is weakly alkaline with a value of 7.7–8.5 when the barium sorption reaches an equilibrium state, regardless of the initial pH of the reactive solution. The results are meaningful in understanding and predicting the fate of barium after the gas field produced water was reinjected into the underground.