This paper carries out an environmental law big data analysis using big data computing based on the legislative framework of biodiversity in Inner Mongolia grassland. For the research and analysis of the rule of law guarantee for the ecological security of the Inner Mongolian grassland, it first establishes the early warning of the ecological security of the Inner Mongolian grassland through the gray prediction model and verifies the accuracy and feasibility of the prediction model precision. According to the early warning results of the ecological security of the Inner Mongolian grassland, it is suggested to enhance the legalization of grassland ecological compensation. The