In today’s globalized agricultural system, information leakage of agricultural biological risk factors can lead to business risks and public panic, jeopardizing corporate reputation. To solve the above problems, this study constructs a blockchain network for agricultural product biological risk traceability based on agricultural product biological risk factor data to achieve traceability of biological risk traceability data of agricultural product supply chain to meet the sustainability challenges. To guarantee the secure and flexible sharing of agricultural product biological risk privacy information and limit the scope of privacy information dissemination, the blockchain-based proxy re-encryption access control method (BBPR-AC) is designed. Aiming at the problems of proxy re-encryption technology, such as the third-party agent being prone to evil, the authorization judgment being cumbersome, and the authorization process not automated, we design the proxy re-encryption access control mechanism based on the traceability of agricultural products’ biological risk factors. Designing an attribute-based access control (ABAC) mechanism based on the traceability blockchain for agricultural products involves defining the attributes of each link in the agricultural supply chain, formulating policies, and evaluating and executing these policies, deployed in the blockchain system in the form of smart contracts. This approach achieves decentralization of authorization and automation of authority judgment. By analyzing the data characteristics within the agricultural product supply chain to avoid the malicious behavior of third-party agents, the decentralized blockchain system acts as a trusted third-party agent, and the proxy re-encryption is combined with symmetric encryption to improve the encryption efficiency. This ensures a efficient encryption process, making the system safe, transparent, and efficient. Finally, a prototype blockchain system for traceability of agricultural biological risk factors is built based on Hyperledger Fabric to verify this research method’s reliability, security, and efficiency. The experimental results show that this research scheme’s initial encryption, re-encryption, and decryption sessions exhibit lower computational overheads than traditional encryption methods. When the number of policies and the number of requests in the access control session is 100, the policy query latency is less than 400 ms, the request-response latency is slightly more than 360ms, and the data uploading throughput is 48.7 tx/s. The data query throughput is 81.8 tx/s, the system performance consumption is low and can meet the biological risk privacy protection needs of the agricultural supply chain. The BBPR-AC method proposed in this study provides ideas for achieving refined traceability management in the agricultural supply chain and promoting digital transformation in the agricultural industry.