The independent innovation of agricultural enterprises ensures national food security through enhancing food production efficiency and optimizing food nutritional quality. Independent innovation is an important way for the sustainable growth of agricultural enterprises. However, in this process, there are issues such as long cycles and high risks. Based on this, using the panel data of China’s listed agricultural enterprises from 2007 to 2021, this study empirically examined the impact of independent innovation on the sustainable growth of agricultural enterprises, as well as the moderating effects of internal drivers (digital transformation) and external pull factors (government subsidies) through a two-way fixed effects model. The findings are the following: (1) The impact of independent innovation on the sustainable growth of agricultural enterprises exhibits an “inverted U-pattern”. When the R&D investment of agricultural enterprises accounts for 77.85% of operating income, the sustainable growth ability of agricultural enterprises is the highest. (2) Compared with large agricultural enterprises, small and medium-sized agricultural enterprises reach the threshold of independent innovation ability later, and the incentive effect range of independent innovation is longer. (3) Independent innovation exerts a more significant “inverted U” effect on the sustainable growth of non-state-owned agricultural enterprises and agricultural enterprises in the mature stage, while its impact on the sustainable growth of state-owned agricultural enterprises and agricultural enterprises in the growth and decline stages is not significant. (4) Government subsidies can help enhance the positive impact of independent innovation on the sustainable growth of agricultural enterprises when it does not exceed the threshold but cannot alleviate the negative impact of independent innovation on the sustainable growth of agricultural enterprises when it exceeds the threshold; investment in digital transformation not only helps to enhance the positive impact of independent innovation on the sustainable growth of agricultural enterprises when it does not exceed the threshold but also helps to alleviate the negative impact of independent innovation on the sustainable growth of agricultural enterprises when it exceeds the threshold. The research results provide data support for agricultural enterprises to carry out innovation activities under internal drive and external pull. At the same time, it is of great significance for the national implementation of the strategy of storing food in technology and food security strategy.