Methods, systems, and apparatus, including computer programs encoded on computer storage media, for blockchain-based decentralized-identifier creation, are provided. One of the methods includes: obtaining a request for creating a decentralized identifier (DID), wherein the request comprises a public key of a cryptographic key pair; creating, based on the public key, a blockchain account associated with a blockchain; creating the DID based on information associated with the blockchain account; and returning a confirmation message comprising the created DID.