We study a generalization of 4-dimensional BF -theory in the context of higher gauge theory. We construct a triangulation independent topological state sum Z, based on the classical 3BF action for a general 3-group and a 4-dimensional spacetime manifold M4. This state sum coincides with Porter's TQFT for d = 4 and n = 3. In order to verify that the constructed state sum is a topological invariant of the underlying 4-dimensional manifold, its behavior under Pachner moves is analyzed, and it is obtained that the state sum Z remains the same. This paper is the generalization of the work done by Girelli, Pfeiffer, and Popescu for the case of state sum based on the classical 2BF action with the underlying 2-group structure.