AbstractDeveloping polymer self‐lubricating composites is of great significance for reducing mechanical friction and wear. In this study, a hybrid of graphitic carbon nitride (g‐C3N4) nanosheets anchored carbon fiber (CF) was constructed through one‐step calcination method to enhance the tribological performance of polyimide (PI). The presence of g‐C3N4 improved the interfacial interaction of CF/PI composite by endowing CF surface with active sites and rough microstructure. Tribological test results demonstrated that CF/g‐C3N4/PI composite had outstanding antifriction and wear resistance, with friction coefficient and wear rate of 0.209 and 2.23 × 10−7 mm3/Nm, which were reduced by 21% and 73.52% compared to pure PI, respectively. This was mainly attributed to the enhanced interfacial interaction, which was conducive to the stress transferring from PI to CF/g‐C3N4 in sliding process. At the same time, the g‐C3N4 nanosheets could give the composite excellent self‐lubrication property by promoting the formation of transfer film. More importantly, the as‐proposed CF/g‐C3N4/PI composite still maintained good self‐lubricating performance in different sliding environment, with a friction coefficient of 0.132 in water environment and 0.049 in oil environment, suggesting it had a broad prospect in polymer self‐lubricating composite. In addition, the corresponding mechanism was discussed based on the analysis of worn surface of the composite and counterpart.