As a distributed ledger technology, blockchain has excellent openness and transparency, which can provide data security management services for distributed intelligent systems and establish effective security guarantee mechanisms. However, precisely due to the open nature of blockchain, malicious users can trace the real transaction transfer path with high probability and even obtain the real identity of users by collecting transaction information on the blockchain and performing data analysis. Besides, existing intelligent systems lack effective encryption or desensitization measures, and attackers are able to access data in intelligent systems through identity forgery and other means, posing a huge potential risk to user privacy. To alleviate the above security issues, this paper proposes an efficient blockchain‐based privacy‐preserving scheme with attribute and homomorphic encryption, which can not only achieve user‐level fine‐grained secure access control but also supports the transmission and verification of blockchain data in the form of ciphertext. The access control method based on attribute‐based encryption and the data transmission method based on homomorphic encryption are proposed, and the blockchain‐based access whitelist mechanism is designed to reduce the resource loss due to repeated authentication. Simulation calculations and blockchain performance experiments show that this scheme can develop flexible access policies according to the attributes of users, has good performance in computational efficiency, and the blockchain performance test results are stable with errors in milliseconds for all operations. It has certain application potential in the field of distributed intelligent systems and blockchain.