An access control method and system based on blockchain technology, which combines blockchain technology with attribute-based access control, including: object attributes are entered into the chain, and based on policies, the judgment process of attributes and policies is bound on all blockchain nodes. Change the access authorization from centralized to distributed, use the consensus mechanism of the block chain to realize the consistency check of the judgment results in the whole network, and permanently record the authorization operation of the access record transaction on the block chain. This method has the characteristics of anti-single point failure, flexible authorization mode, precise access boundary, and auditable records. The present invention is applicable to enterprises, governments, etc. that have data privacy protection requirements and realize multi-branch collaborative work environment based on the block chain platform, and can manage the access rights of users in the system in a dynamic and scalable manner, and realize it around policies and attributes Fine-grained authority management has important practical significance for protecting information system security in a distributed network environment.