By increasing smart objects as high-potential computing devices and 5G technology, the Internet of Things (IoT) has emerging technology to provide a data-centric infrastructure for detecting safe device-to-device communications by supporting security and privacy issues. As 5G-enabled communication technology, Vehicle-to-Vehicle (V2V) communication provides a wirelessly exchange information connection between smart vehicles, intelligent devices and cloud-edge computing environment. This connection should be established with a safe and secured run-time protection system to avoid many critical anomalies and misbehavior problems. Detecting run-time malicious transformations with data-centric misbehaving reactions is a main challenge for autonomous vehicle communications with 5G-enabled communication technology. This paper provides a hybrid Genetic Algorithm-based Ensemble Bagged Trees (GA-EBT) algorithm for a data-centric misbehavior detection approach to support the V2V communications against malicious and misbehavior transactions. For evaluation of the proposed algorithm, four real test-cases are applied for messaging injection attacks in the V2V environments with compare to the state-of-the-art machine learning algorithms. The experimental results show that the proposed hybrid approach can achieve to optimal high rate accuracy factor with 99.999, precision and recall factors with 100% and F1-Score factor with 100% to detect unexpected cyber-attacks for the V2V communications in the IoT environment.