The invention provides a medical data sharing method based on a block chain, which comprises the following steps: S1, a node registers a public key on the Internet, the node is a node in an alliance group, and the public key is a 32-bit identifier; s2, the mechanism encrypts the data through a public key and then uploads the data to a database; s3, the client sends a request to the main node, broadcasts the request after receiving the request and reaches a consensus; s4, the data is uploaded to a blockchain database; s5, a block chain is formed by the block, the node is interacted by using aninterface provided by a web, and a private key of the user is encrypted by using a password; s6, when the user inquires the data, an identity authentication mode is adopted, and the user can upload the data and can also inquire the data. According to the decentralized, traceable and tamper-proof data sharing method based on the block chain, the data can be shared, and meanwhile the safety of the data can be guaranteed.