Device-to-Device (D2D) communication is one of the enabling technologies for 5G networks that support proximity-based service (ProSe) for wireless network communications. This paper proposes a power control algorithm based on the Nash equilibrium and game theory to eliminate the interference between the cellular user device and D2D links. This leads to reliable connectivity with minimal power consumption in wireless communication. The power control in D2D is modeled as a non-cooperative game. Each device is allowed to independently select and transmit its power to maximize (or minimize) user utility. The aim is to guide user devices to converge with the Nash equilibrium by establishing connectivity with network resources. The proposed algorithm with pricing factors is used for power consumption and reduces overall interference of D2Ds communication. The proposed algorithm is evaluated in terms of the energy efficiency of the average power consumption, the number of D2D communication, and the number of iterations. Besides, the algorithm has a relatively fast convergence with the Nash Equilibrium rate. It guarantees that the user devices can achieve their required Quality of Service (QoS) by adjusting the residual cost coefficient and residual energy factor. Simulation results show that the power control shows a significant reduction in power consumption that has been achieved by approximately 20% compared with algorithms in [11].