In view of the principal–agent relationship between local government and pollution enterprise in environmental governance, this paper established a multitask principal–agent model, gave the optimal contract form of local government incentive to enterprises, examined the influencing factors of the optimal incentive contract, and focused on analyzing the influences of institutional factors, enterprise types and enterprise attributes on the optimal incentive contract. The results show that the optimal incentive contract is affected by the influence coefficient of enterprise economic benefits on local government revenue, the environmental index weight in government performance systems, the types of enterprise, the risk preference of enterprise, the variance in economic benefits, the variance in pollution emission reduction, the ability of economic benefits, the direct cost of emission reduction and the economic cost (income) of emission reduction. In order to realize the coordinated development of economy and environment, the establishment and adjustment of optimal incentive contract should be established or adjusted according to the institutional factors, different types of enterprise, and the enterprise characteristics. Local governments should divide enterprises into traditional enterprises and green innovative enterprises in the process of management. The policy formulation of the local government should be based on the characteristics of the system and cooperate with the national strategy. Local governments should actively collect and master the attribute information of the enterprises, including risk preference, profit model, pollution control technology and ability, management experience and level, production mode and green innovation ability. Local governments should combine the types of enterprises, the characteristics of institutions and the attributes of enterprises, and adjust various policies and measures more flexibly.