The total factor productivity of grain (TFPG) is critically important to secure food production, while its spatiotemporal heterogeneity in the urbanized area is largely ignored. Selecting 41 cities in the Yangtze River Delta, this study uses the data envelopment analysis (DEA) Malmquist index method to measure the TFPG in each city from 2012 to 2020 based on panel data, and explores the driving factors of the spatiotemporal evolution of the TFPG with the geographically and temporally weighted regression model. The results indicate the following: (1) Both the TFPG and technological progress varies in the same direction, indicating that technological progress dominates the TFPG in the studied region. The changes in technical efficiency, pure technical efficiency, and scale efficiency are relatively stable. (2) The spatial distribution of the TFPG shows a decentralized trend, with a pattern of high in the north and east areas and low in the south and west areas. (3) The driving factors, such as the development level of the grain economy, the amount of fertilizer used per unit area, and gross domestic product (GDP) per capita, have a restraining effect on the improvement of the TFPG, in which the amount of fertilizer used per unit area is the critical factor. (4) The scale of per capita labor operation, the proportion of the grain-growing population, and output of grain per hectare exert a promoting effect on the TFPG, in which both the proportion of the grain-growing population and output of grain per hectare are the critical factors. Finally, improving the efficiency of fertilizer use, expanding the production scale of the grain planting industry, and increasing the output of grain per hectare are proposed to improve the TFGP in the Yangtze River Delta.