The vacuum energies corresponding to massive Dirac fields with the boundary conditions of the MIT bag model are obtained. The calculations are carried out with the fields occupying the regions inside and outside the bag, separately. The renormalization procedure for each of the situations is studied in detail, in particular the differences occurring with respect to the case when the field extends over the whole space. The final result contains several constants that undergo renormalization and can be determined experimentally only. The non-trivial finite parts which appear in the massive case are found exactly, providing a precise determination of the complete, renormalized zero-point energy in the fermionic case. The vacuum energy behaves as an inverse power of the mass, for large mass of the field.