The invention discloses a data sharing method based on decentralized identity and proxy re-encryption. The method comprises the following steps: a data owner randomly generates a secret key A, encrypts original data R by using the secret key A to obtain encrypted data D, and pushes the encrypted data D to a data storage center for storage; then, the data owner encrypts the secret key A by using the own DID public key, generates an encrypted ciphertext C1, generates claim-1, and stores the claim-1; the data user sends a data use request to the data owner, the data owner authorizes the data user, and claim-2 authorization information is generated; the data user requests data specified by the corresponding claim from the access controller, and after it is confirmed that the data user has the access permission to the data, the data user obtains the original data R through decryption. According to the method, the absolute control right of the user on the data is strictly protected while the data is shared, and the data privacy of the user is ensured to the greatest extent.