Since the steep rise in mobile users and data rates, handling the higher rates of data is of major concern for any future wireless networks, mobile service providers are striving hard to handle such huge data with the efficient handover. Also, they are seeking techniques to establish communication between the user equipment (UE) without routing through the base station. Device-to-Device(D2D) technique can be used to establish the connection without routing through the base station. Therefore, the Peer-to-Peer(P2P) method which utilizes the D2D concept is expected to solve this problem with the seamless handover for future beyond 5G (B5G) wireless technology. In this paper, P2P mobility management using D2D communication for seamless handover is proposed. It is expected to be a key feature in the upcoming B5G technology. It allows direct communication between two devices in close proximity to each other. The seamless handover in P2P considers two operating modes, either Direct or D2D. In the latter, ground eNB (gNB) is identifying one nearby UE which is already either in connection or not active to configure as a relaying device to transfer data to the UE from the gNB. During the handover, the gNB is identifying the best operating mode (D2D or direct) for transferring the data towards the receiver UE. The proposed direct and D2D mode handover is verified and validated. The performance validation shows that D2D mode based handover provides better handover with negligible latency compared to the direct mode. © 2021, The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature.