A total of 18 samples of shallow groundwater around the Hancheng mining area in the Guanzhong Basin were collected from 1–4 May 2018. According to the analysis of hydrochemical data, the Gibbs semi-logarithmic diagram and Piper diagram were used to research the hydrogeochemical behavior of shallow groundwater around the Hancheng mining area in the Guanzhong Basin. The results of the groundwater hydrochemical analyses shown on the Gibbs and Piper plots are as follows: The chemical composition analysis showed that the main cation components were Mg2+, Ca2+, Na+, and K+, the anion components were HCO3−, Cl−, and SO42−. A measure of 89% of the groundwater samples in this area were freshwater, the HCO3− were mainly dolomite, calcite, and gypsum dissolved precipitation resulted. Na+ and Cl− came from the dissolution of halite. Most of the groundwater was of the SO4·Cl-Ca·Mg type, accounting for 61.1%. The main ion chemistry of the shallow groundwater in this area is controlled by rock weathering, and pyrite oxidation is a significant factor affecting the SO42− concentration. These research results will help analyze the formation mechanism of chemical components and provide some basic data for the evolution of mine water in this area in the future.