The inferior dispersion stability and simple functionality of MoS2-based nanofluids restrict their efficient application in lubrication. Herein, a novel nanofluid composed of C3N4/MoS2, 3-isocyanatopropyltrimethoxysilane, and C3N4/MoS2-catalyzed product (polyethylene glycol-borate ester, PEG-BA) was proposed. C3N4 nanosheets could induce the formation of regular MoS2 nanospheres. The resulting C3N4/MoS2 showed excellent catalytic activity for the esterification of PEG-BA. The C3N4/MoS2 @PEG-BA nanofluid exhibited favorable dispersion stability in PEG600 with no stratification for ≥ 82 days. The addition of 3.0 wt% C3N4/MoS2 @PEG-BA nanofluid could significantly reduce friction coefficient (30.7 %) and wear scar diameter (28.9 %). The excellent lubrication properties of the nanofluid are attributed to the synergistic lubrication effect of C3N4/MoS2 and PEG-BA. Furthermore, the nanofluid exhibits remarkable photothermal conversion performance in both oil and air mediums.