We investigate the effects of carbon (C) on hydrogen (H) solubility in copper (Cu) using a first-principles method. We show C can increase the solution energy of H in the bulk Cu originated from the charge density redistribution, which leads to a weak repulsion between H and C in Cu. On the contrary, we demonstrate the C-vacancy (C-V) complex can serve as a trapping centre of H, and one C-V complex can hold up to six H atoms. Moreover, it is found that C can effectively decrease the solution energy of a single H in the vacancy, 0.68 eV lower than that of H in the C-free vacancy, changing the solution process of H in the vacancy from endothermic to exothermic. This can be attributed to the strong bonding interaction between H and C in the vacancy. Based on analyzing the role of C in different metals, we propose that the effects of C on the H solubility in the vacancy mainly depend on the difference between the H-C interaction and the C-metal atom interaction. These indicate that C plays a key role in H trapping behavior in Cu.