The utilization of self-sensing concrete for structural monitoring is currently a significant research focus. This study involves fabricating self-sensing cement-based composites(SCC) with different carbon fiber contents; the graphite powder content remains fixed at 20 % by mass. The investigation focuses on assessing the influence of carbon fiber on the mechanical strength, electrical conductivity, and piezoresistive properties of cement-based composites incorporating graphite. Furthermore, the study examined the modification mechanisms of carbon fiber in SCC through Nuclear Magnetic Resonance (NMR) and Scanning Electron Microscopy (SEM). The compressive strength initially increases and then decreases with the addition of carbon fibers, reaching a peak of 43.01 MPa at a carbon fiber concentration of 0.6 vol%. SEM analysis revealed that the primary failure mode of carbon fibers is pull-out behavior, which enhances the damage pathway of SCC, thereby improving their mechanical properties. According to NMR results, the porosity of the SCC decreases to varying degrees with the inclusion of carbon fibers, showing an 11.36 % reduction at a carbon fiber concentration of 0.6 vol%. Under cyclic compressive loading within the elastic range, the change in resistivity can reach up to −76.8 %, with a strain sensitivity factor of 1300. Based on the results, it was determined that the addition of 0.6 vol% carbon fibers can significantly improve the mechanical, electrical conductivity, and piezoresistive properties of SCC with a graphite-modified cement matrix.