Most of the existing peer-to-peer (P2P) content distribution schemes carry out a random or rarest piece first content dissemination procedure to avoid duplicate transmission of the same pieces of data and rare pieces of data occurring in the network. This problem is solved using P2P content distribution based on network coding scheme. Network coding scheme uses random linear combination of coded pieces. Hence, the above-stated problem is solved easily and simply. Our proposed mechanism uses network coding mechanism in which several contents having the same message are grouped into different groups and coding operation is performed only within the same group. The interested peers are also divided into several groups with each group having the responsibility to spread one set of contents of messages. The coding system is designed to assure the property that any subset of the messages can be utilized to decode the original content as long as the size of the subset is suitably large. To meet this condition, dynamic smart network coding (DSNC) scheme is defined which assures the preferred property, then peers are connected in the same group to send the corresponding message, and connect peers in different groups to disseminate messages for carrying out decoding operation. Moreover, the proposed system is readily expanded to support topology change to get better system performance further in terms of reliability, link stress and throughput. The simulation results prove that the proposed system can attain 20-25% higher throughput than existing systems, good reliability, link failure and robustness to peer churn. © 2020 World Scientific Publishing Company.