In this work, the functionalized covalent organic framework (COF) was prepared via a convenient ball milling process. The aldehyde group terminated COF-F reacted with amino thiadiazole in the ball milling jar under mechanical forces; hence, the thiadiazole functionalized COF-F was obtained and denoted as Thdz@COF-F. The as-prepared Thdz@COF-F serves as an oil-based lubricant additive and exhibits remarkable tribological properties, which can reduce the average friction coefficient of base oil from 0.169 to 0.102 and decrease the wear volume by 87.0%. The antifriction and antiwear performances are mainly due to the repairing effect of Thdz@COF-F nanoparticles and the protective tribo-film that averts the direct contact of friction pairs. In addition, through the ball milling method, triazole and thiazole functionalized COF-F were also prepared and represented good lubrication performance, demonstrating the feasibility of this mechanochemical synthesis method for functionalized COFs.