Adding a reputation incentive system to peer-to-peer (P2P) energy transactions can encourage prosumers to regulate their trading behavior, which is important for ensuring the efficiency and reliability of P2P transactions. This study proposed a P2P transaction mechanism and game optimization model for prosumers involved in distributed energy sources considering reputation-value incentives. First, the deviation of P2P transactions and the non-consumption rate of distributed renewable energy in P2P transactions were established as indicators to quantify the influencing factors of the reputation value, and a reputation incentive model of P2P transactions for prosumers was constructed. Then, the penalty coefficient was applied to the cost function of the prosumers, and a non-cooperative game model of P2P transactions based on the complete information of multi-prosumers was established. Furthermore, the Nash equilibrium problem was transformed into a nonlinear optimization problem by constructing the modified optimal reaction function, and the Nash equilibrium solution of the game was obtained via a relaxation algorithm. Finally, the modified IEEE 33-node test system based on electricity market P2P and an IEEE 123-node test system were used to analyze and verify the cost and P2P participation of prosumers considering the reputation value. The results show that the addition of the reputation incentive system can encourage prosumers to standardize their interactive transaction behavior and actively participate in P2P transactions. It can also improve the operation efficiency of the power grid and promote the perfection of the P2P transaction mechanism.