The Industrial Internet of Things (IIoT) is a collection of interconnected smart sensors and actuators with industrial software tools and applications. IIoT aims to enhance manufacturing and industrial processes by capturing and analyzing real time industrial data. However, the heterogeneous and homogeneous nature of IIoT networks makes them vulnerable to several security threats. As data is transmitted over an insecure communication medium, intruders may intercept communication among different entities and perform malicious activities. Consequently, ensuring the security and privacy of data transmitted in IIoT networks is essential. Motivated by the aforementioned challenges, this paper presents a deep learning integrated blockchain framework for securing IIoT networks. Specifically, first we design a private blockchain based secure communication among the IIoT entities using session-based mutual authentication and key agreement mechanism. In this approach, the proof-of-authority (PoA) consensus mechanism is used for verification of the transactions and block creation based on the voting of miners over the cloud server. Second, we design a novel deep learning-based intrusion detection system that combines Contractive Sparse AutoEncoder (CSAE), Attention-based Bidirectional Long Short Term Memory (ABiLSTM) networks and softmax classifier for cyberattack detection. The practical implementation of blockchain and deep learning techniques proves the effectiveness of the proposed framework.