A topological quantum field theory on a 4k-dimensional manifold M admitting an almost quaternionic structure is proposed. Expectation values of certain operators on M are proved to be independent of the choice of an almost quaternionic structure used in calculations and thus carry only smooth information about M. These invariants are explicitly expressed as integrals of differential forms over the instanton moduli space associated with a chosen almost quaternionic structure. When M admits a hyperKähler structure the topological field theory has three additional supersymmetries which induce three complex structures on the associated instanton moduli space proving thus that the latter is a hypercomplex manifold. In this case an analogue of the four-dimensional Donaldson map is constructed which provides a number of candidates for new invariants of 4k-dimensional hypercomplex structures. In the case k = 1 the proposed topological theory on an almost quaternionic manifold reproduces the Witten interpretation of the four-dimensional Donaldson invariants.