Ecological security evaluation and land space governance are effective ways to ensure regional ecological security and realize sustainable development. This study evaluated the ecological security status at the raster scale and conducted research on the restoration and governance of the national territory, with the aim of implementing accurate restoration, reducing ecological restoration costs, and increasing ecological restoration benefits. Taking the typical arid inland river Shule River Basin as an example, this study selected evaluation factors from production, living, and ecological perspectives, obtained the influencing factors of regional ecological security by spatial principal component analysis, and calculated the ecological security index on the grid scale of production, life and ecological space. The macro-scale national parks, ecological protection red line and other realistic constraints are combined with the grid-scale ecological security evaluation results to achieve accurate land space restoration and governance. The results show that the ecological space accounts for 79.23%, and the production space only accounts for 7.47%, which is similar to other inland river basins in arid areas. The study found that per capita GDP and distance to the road have a significant impact on the ecological security of the study area from the perspectives of production and life, while distance to the water, vegetation coverage, and land cover have a significant impact on ecological security from the ecological perspective. Moderate, moderate low and low ecological security zones account for 72.09% of the total area of the basin, indicating that the ecological security guarantee ability of the Shule River Basin is low. The ecological security level of the living space was the lowest, and the ecological security pattern of the basin area as a whole presented a “higher in the north and south and lower in the middle” characteristic. The land restoration and governance of the Shule River Basin area was divided into five types of ecological control, ecological conservation, ecological enhancement, ecological restoration and ecological management, of which the ecological control area accounted for as much as 35.86%, implying that ecological security in the Shule River Basin has attracted sufficient attention from the government. It is considered that the management of production and living space is more difficult, complex and important, and the proportion of space is relatively small, so it is necessary to focus on the comprehensive management project of ecological protection and restoration. However, the ecological endowment conditions of ecological space in the Shule River Basin are relatively poor, and the distribution area is vast, so natural restoration should be given priority, supplemented by artificial restoration. This study provides a reference for regional ecological security evaluation, ecological civilization construction, and national ecological security research and practice.