The smart grid (SG) is one of the largest Internet of Things (IoT) applications. Therefore, it encompasses a variety of smart objects, including smart appliances, smart meters, and sensors, among others. All of these devices are scattered throughout the SG to serve a variety of objectives. As a result, the SG network architecture is exposed to various security threats. Furthermore, numerous authentication and key agreement techniques have been developed throughout the years to protect the communication between entities. However, several of them are homogeneous protocols, which means that only entities running similar cryptographic schemes can communicate. In addition, the SG communication system is centralized and susceptible to a single point of failure and management. Moreover, the existing protocols involve extensive cryptographic elements that cannot be processed by a smart meter’s (SM) computing power. To address the aforementioned issues, an AP-HBSG: authentication protocol for heterogeneous blockchain-based smart grid environment is designed. The designed protocol operates in a decentralized environment, thus eliminating a single point of failure and management. Furthermore, a blind signature is applied to the blockchain network to add authentication security among blockchain nodes. In addition, AP-HBSG is lightweight and it fits the SM computing capability. Moreover, AP-HBSG can protect the communication of parties interacting in a heterogeneous environment. On the other hand, the security of the presented protocol is analyzed in the random oracle model (ROM) and proved under the elliptic curve discrete logarithm (ECDL) problem and the computational Diffie–Hellman (CDH) problem. The protocol’s performance analysis shows that, compared to the most recent protocols, ours has lower communication and computation costs. The computation cost (ms) is 122,68, 216.86, 391.34, and 92.01 for WHZS, KKN, WLCTA, and ours, respectively. On the other hand, the communication cost (bytes) is 344, 184, 568, and 182 for WHZS, KKN, WLCTA, and ours, respectively.