Mobile adhoc network (MANET) is a type of wireless configuration that features self-organizing wireless mobile nodes and adaptive network connection. Security is a key concern for MANETs due to their dynamic nature and continually changing topology. To improve security, an adaptive trust threshold-aware secure energy-efficient protocol was designed, which adaptively predicts the threshold value using an artificial neural network (ANN) to evaluate the node's trust for detecting and preventing the suspected nodes. In contrast, it fails to detect and mitigate conflicting behavior (CB) attacks, in which the suspected node may behave well towards a specific group of nodes and badly towards another group of nodes. Therefore, this article proposes a CB attack prediction using the shared learning-based ANN (CBAP-SLANN) algorithm to predict CB attacks in different nodes as well as different timeslots within the same node. The trust calculation should then take into account the consistency of behavior when employing different node-based observations along with the proposed different time-based observations. Initially, nodes are divided into overlapping clusters, and the trust and various network parameters of each node are observed for every group individually. Then, the ANN algorithm is trained in each group using the observed parameters and the trained model for each group is combined to get the global decision, which helps to predict the CB attack nodes in the network. At last, the simulation outcomes show that the CBAP-SLANN algorithm attains 93.1% accuracy when deploying 300 nodes compared to the trust-based routing algorithms.