As the global food safety problem has increasingly become severe and supply chain reforms and food recalls are costly and challenging, it is particularly important to establish agricultural food traceability systems. Countries around the world are paying increasing attention to developing food safety traceability systems. Under the background of smart agriculture, information and communication technology can be further improved through blockchain infrastructure to achieve new farms and digital agriculture, thus ensuring end-to-end safety traceability of agricultural products from planting to sale. Through the analysis of the latest domestic and international research, this paper systematically elaborates on recent progress in research on agricultural food traceability based on blockchain technology. It dissects the processes of agricultural food supply chains, and proposes a basic architecture of blockchain in the field of agricultural food traceability. In addition, this paper summarizes the application of blockchain in agricultural food traceability, focusing mainly on blockchain combination with cloud-edge computing, encryption technology, storage optimization, consensus mechanism improvement, and smart contract design. It also points out the challenges in data security, storage scalability, regulatory difficulties, and practical applications. Finally, it proposes future direction for blockchain technology in agricultural food traceability such as strengthening security supervision, improving blockchain scalability, and empowering food traceability with emerging technologies. It emphasizes the opportunities and challenges in the application of blockchain technology in the agricultural food supply chains.