Z-carbon is a candidate structure proposed recently for the cold-compressed phase of carbon.We have studied the mechanical properties of Z-carbon by performing the first-principles density functional calculations. The single-crystal elastic constants calculations show that Z-carbon is mechanically stable. The predicted bulk and shear moduli of Z-carbon are comparable to diamond and cubic BN, suggesting that Zcarbon can be a superhard material. We also obtained the ideal tensile and shear strengths for Z-carbon through deformation from the elastic regime to structural instability. The failure modes under tensile deformation were explored carefully based on the calculated charge density distribution and bonding evolution.