The current privacy protection scheme of medical electronic health records ignores the security of role interaction, which leads to low security of medical electronic health record data and a long time for data encryption and decryption. This paper proposes a privacy protection method of medical electronic health records based on blockchain and asymmetric encryption. This paper uses blockchain technology and asymmetric encryption algorithm to establish an electronic health record system model, selects the alliance chain to control the permissions of alliance members, constructs the corresponding sub key, uses shared users for information interaction, obtains the file key through verification (so as to decrypt the data and obtain the shared data plain text), and realizes medical electronic health through the privacy and protection scheme process of health records. Experimental results show that the data security of the proposed method is as high as 92 %, and the encryption and decryption time is only 0.45 s, which can effectively improve the data security and shorten the data encryption and decryption time.