We report on the realization of an on-chip bidirectional frequency shifting device (BFSD), which can be well applied to optical frequency transfer (OFT) systems. The BFSD mainly consists of two cascaded traveling wave phase modulators (PMs), and after applying the serrodyne modulation, the optical frequency signal can be efficiently shifted bidirectionally. We fabricate the proposed BFSD on a thin-film lithium niobate on insulator (LNOI) platform with a measured half-wave voltage of about 2.3 V. The frequency shifting efficiency is more than 98.8%, and the carrier suppression (CSR) and sideband suppression ratio (SSR) can reach 42 dB and 31 dB, respectively. Promisingly, the BFSD-based OFT system can achieve the theoretical phase noise suppression capability. This technique paves the way for the construction of chip-based optical frequency transfer networks.