This paper studies Physical-layer Network Coding (PNC) in a two-way relay channel (TWRC) operated based on OFDM and QPSK modulation but with the presence of carrier frequency offset (CFO). CFO, induced by node motion and/or oscillator mismatch, causes inter-carrier interference (ICI) that impairs received signals in PNC. Our ultimate goal is to empower the relay in TWRC to decode network-coded information of the end users at a low bit error rate (BER) under CFO, as it is impossible to eliminate the CFO of both end users. For that, we first put forth two signal detection and channel decoding schemes at the relay in PNC. For signal detection, both schemes exploit the signal structure introduced by ICI, but they aim for different output, thus differing in the subsequent channel decoding. We then consider CFO compensation that adjusts the CFO values of the end nodes simultaneously and find that an optimal choice is to yield opposite CFO values in PNC. Particularly, we reveal that pilot insertion could play an important role against the CFO effect, indicating that we may trade more pilots for not just a better channel estimation but also a lower BER at the relay in PNC. With our proposed measures, we conduct simulation using repeat-accumulate (RA) codes and QPSK modulation to show that PNC can achieve a BER at the relay comparable to that of point-to-point transmissions for low to medium CFO levels.