Using first-principles calculations, we systematically studied the mechanical properties and electronic structure of the recently synthesized diamondlike BC5. Our calculated bulk modulus B, shear modulus G, elastic constant c44, and theoretical hardness H confirm that BC5 is an ultraincompressible and superhard material. Also, it exhibits mechanical stability and metallic features. Electronic structures show that a strong covalent bond network through sp3 hybridization is the origin of the excellent mechanical properties of BC5. Our results show that BC5 has good prospects in electronic application as a superhard material.