For the relay cooperation systems or networks, in some scenarios, the relay is deployed in the hard-to-reach areas, such as on the remote mountains or in the sea. It is impractical for the relay to be powered by grid energy. And if the relay is powered by battery, it is difficult and high cost to replace the depleted battery. To overcome the power dependence of the relay, this article proposes the network-coding-based two-way relay cooperation with energy harvesting, where the relay is equipped with multiple antennas for information decoding and energy harvesting. Network coding is adopted at the relay to reduce the time slots, and low-density parity check codes are employed at the sources to improve the reliability. We introduce a maximal ratio combining-based decoding algorithm for the proposed system to achieve coding gain and diversity gain. Furthermore, we analyze the outage probability and bit error rate of the system when the optimal antenna selection algorithm is adopted at the relay to transmit data. Theoretical analysis and numerical simulation results show that the proposed system outperforms the corresponding point-to-point system under the same condition. The result also demonstrates that the relay should be deployed closer to the user whose outage probability is required to be lower.