Simulation technology of groundwater is the main method for evaluating the effect of coalfield groundwater and designing the drainage in mining areas. According to analyzing geological conditions and hydrogeology characteristcs in mining areas, the conceptual model of hydrogeology is set up and the boundary conditions are determined. By taking Tianshuihe coalfield in Ningxia as the research object, using finite difference MODFLOW program, a 3D numerical simulation model for the groundwater is established. It can provide more precise information for effective control of groundwater and safety exploration based on predicting the groundwater flow field during the coalfield exploitation and water inflow.