The research challenges to enhance the throughput of communication networks revealed the concept of network coding which is based on the idea of coding at packet level. The bi-directional relay channel in which two user terminals exchange independent information with the help of a relay terminal is among the prominent applications of network coding in wireless cooperative communications. In this paper, maximum likelihood (ML) performance analysis of digital relaying based bi-directional communication is presented. The three stage communication scenario is considered where the first and second stages are allotted to the transmissions of the users and after demodulation the relay broadcasts the network encoded packet obtained by a bit-wise XOR operation to the users in the third stage. The average bit error rate of this scheme with ML detection is derived for Rayleigh fading channels under noncoherent BFSK and coherent BPSK signaling. Simulation results are also presented to validate the theoretical analysis. Analytical and simulation results show that digital relaying based three stage bi-directional communication scheme with ML detection not only outperforms the noncooperative system that involves direct transmissions between user terminals but also prevents the diversity level reduction due to error propagation. Copyright (C) 2010 John Wiley & Sons, Ltd.