Atomistic simulation of nanoindentation is performed to investigate the effect of Cu segregation at grain boundaries (GBs) on the mechanical properties of FeNiCrCoCu high-entropy alloys. Initially, a combined Monte Carlo and Molecular dynamics simulation technique is adopted to generate the models with Cu segregation, and further the cases of random Cu distribution are considered for the purpose of comparision. The dislocation density, shear strain and GB behavior in the process of nanoindentation are analyzed in detail. The results reveal that the Cu segregation at GBs leads to superiority in hardness, strength, and stiffness. Dislocation analysis shows that the sessile dislocation density is higher at the initial state for the segregation sample, while dislocation nucleation and movements are suppressed so that dislocation-mediated plasticity is weakened. Furthermore, microrotation analysis during the nanoindentation process indicates that segregation of Cu pins the GBs, thereby inhibiting GB rotation and consequently weakening GB-mediated plastic deformation. In this case, grain refinement is observed, and in good agreement with experiment results. Overall, this study provides insights into the influence of GB segregation of Cu on the mechanical properties and deformation response of FeNiCrCoCu HEAs, and highlights the importance of GB composition for tailoring high-strength materials.