We present the first lattice QCD calculation about the mass decomposition of triply charmed baryons with J P as 3 2 + and 3 2 − . The quark mass term H M contributes about 66% to the mass of 3 2 + state, which is slightly lower than that of the meson system with the same valence charm quark. Furthermore, based on our results, the total contribution of sea quarks, the gluons and the QCD anomaly accounts for about a quarter of the mass of these two triply charmed baryons. The mass difference of 3 2 + and 3 2 − states is mainly from the quark energy H E of the QCD energy-momentum tensor. For comparison, the mass splitting is also calculated under the framework of the constituent quark model.