This paper proposes a Vehicle-to-Vehicle (V2V) communication-based forward collision avoidance algorithm by alarming the driver for the normal driver mode and controlling the driving wheel for the self-governed (autonomous) driving mode. The proposed algorithm benefits from the information exchange between the host vehicle and the leading vehicle to calculate the safe distance between host vehicle and leading vehicle to guarantee the avoidance of the collision. The proposed system gives advisory and imminent warnings according to the predicted accident levels, using a three different levels of collision avoidance for the driver mode. Also, in the autonomous driving mode, it follows an alternative optimal path to avoid the collision. The simulation results are implemented using Prescan and MATLAB. The simulation results show that the proposed collision avoidance system makes a composite analysis of the collision risk and provides an accurate real-time warning and an alternative path for dual driving modes.