The effective usage of a WBAN elaborated as a wireless body area network in remote healthcare services is made conceivable by the speedy progression of wireless transmission technologies. Wearable sensors are used in WBANs to gather patient health information and communicate it over a public channel to the controller node. Due to the wireless nature of communication, many attacks can be attempted over WBAN communication. This necessitates an appropriately authenticated key agreement mechanism and protected information transfer between the user’s device and the controller node. The key escrow issue plagues identity-based systems and is avoided by certificateless authenticated key agreement (CLAKA) protocols, which also eliminate certificateless operational overheads in public key infrastructure. This paper proposes an efficient and secure protocol named ES-CLAKA for WBANs based on blockchain, which satisfies multiple security features. Informal analysis confirms that the attributes of forward security, key security, known temporary key security, key control security, key escrow, anonymity, verifiability, consensus, immutability, and unknown key share are fulfilled by ES-CLAKA. The security of the authenticated key-establishment phase and the concealment of the established key have been established through a formal analysis of the ES-CLAKA protocol utilizing the BAN logic and the ROR model, respectively. Results show that compared to the other most effective CLAKA protocols, ES-CLAKA consumes 47.4% less computational time, 20% less communication bandwidth, and 16.67% less storage overhead under reasonable assumptions. Comparative assessment of the security attributes has revealed that, when equated to other analogous schemes, the proposed ES-CLAKA protocol offers the highest level of security.