A novel carbon allotrope is predicted by first-principles calculations. This allotrope is obtained by replacing one of the two atoms in the primitive cell of diamond with a carbon tetrahedron, thus it contains five atoms in one primitive cell, termed T5-carbon. The stabilities of T5-carbon are checked in structural, thermal and vibrational calculations. T5-carbon is a wide band gap semiconductor with an indirect band gap of 4.30 eV, and has a lattice thermal conductivity of 409 W/mK. Mechanical analyses reveal that T5-carbon shows good mechanical performances. Furthermore, by modifying T5-carbon with replacing some carbon atoms with Si or Ti atoms, we can obtain SiC4 or TiC4 structures. Importantly, the TiC4 system has a moderate conduction and valance band edges, comparable larger absorption capacity of visible light and smaller effective masses of electron and hole carriers than TiO2, confirming its photocatalysis applications.