The invention discloses an electronic file access control method and system based on hierarchical security encryption. The electronic file access control method includes the steps: firstly, setting the security level of an electronic file, then distributing a grading key to an electronic file sender, carrying out grading encryption on the electronic file, carrying out grading access control, and finally updating the key. The electronic file access control system comprises a user registration/management module, an electronic file security classification management module, an electronic file classification encryption module, an electronic file classification decryption module, a key distribution management module, a key calculation recovery module, an electronic file sending/receiving moduleand a database module. According to the invention, the electronic file is encrypted in a graded manner according to the security level of the electronic file, and graded decryption and access controlare performed on the electronic file according to the security level of the user, so that the multi-level security of the electronic file is realized, and the security of the electronic file is effectively protected. Through hierarchical encryption and hierarchical decryption, hierarchical access control of the electronic file is realized.