The advanced progressions in Wireless Sensor Network (WSN) made this network an effective one in a huge range of applications. Though, the WSN environment suffers from security and energy complexities. WSN has several benefits and still, it has a few challenges. These complexities help the attackers for analyzing the network security and then, they may destroy entire networks. Hence, this work addresses the energy and security issue and adopts the deep learning and meta-heuristic-based trust-aware cluster head selection protocol in WSN. Here, Whale Optimization Algorithm (WOA) is used to select the optimal cluster head using the multi-objective function using constraints like the distance, energy, delay, and trust of nodes. Here, the security management in terms of node trust is determined by the artificial intelligent model termed Deep Neural Network (DNN) for maintaining the security in routing. Through the performance analysis, the performance evaluation has shown that the designed architecture offers reliable and feasible performance in WSN.