The next-to-next-to-leading order post-Newtonian spin-orbit and spin(1)-spin(2) Hamiltonians for binary compact objects in general relativity are derived. The Arnowitt-Deser-Misner canonical formalism and its generalization to spinning compact objects in general relativity are presented and a fully reduced matter-only Hamiltonian is obtained. Several simplifications using integrations by parts are discussed. Approximate solutions to the constraints and evolution equations of motion are provided. Technical details of the integration procedures are given including an analysis of the short-range behavior of the integrands around the sources. The Hamiltonian of a test-spin moving in a stationary Kerr spacetime is obtained by rather simple approach and used to check parts of the mentioned results. Kinematical consistency checks by using the global (post-Newtonian approximate) Poincaré algebra are applied. Along the way a self-contained overview for the computation of the 3PN ADM point-mass Hamiltonian is provided, too. 3641 947 102 1 The following literature and in particular [88] gives a complete overview over the research area of parameterization. See e.g. [89] for a point-mass 1PN parameterization, [90] for a point-mass 2PN parameterization, [91] for a quasi-Keplerian 3PN point-mass parameterization, [92, 93] for point-mass parameterizations under leading order spin-orbit coupling, [94] for using a 3PN point-mass parameterization including radiative dynamics for the phasing of gravitational waves, [95] for a post-equal-mass parameterization of a binary at 3PN point-mass level under leading order spin-orbit coupling, and finally [96] for a parameterization up to 2.5PN with orbital angular momentum aligned spins. [97] incorporates the linear-in-spin Hamiltonians given in the present article into the orbital elements for orbital momentum aligned spins.3 series. Such a resummation was successfully implemented into the effective-one-body approach, which analytically provides complete gravitational waveforms for binary inspiral that are in good agreement with numerical relativity. This succeeded so far for point-masses [127,128] and for non-precessing spins [129] by calibrations to full numerical simulations, but more work is needed for precessing spins [130,131]. Here the Hamiltonians derived in the present paper should be very useful, and the spin-orbit one was indeed already incorporated into the effective-one-body approach [132,133]. See also [134] for a very complete overview of the literature on the effective-one-body approach. Alternative ways of resumming the post-Newtonian series by Padé approximants are possible, which is most interesting for certain gauge invariant quantities [135,136]. Within the overlap region of post-Newtonian approximation and numerical relativity in which the gravitational field is not too strong and the number of orbits can be handled by numerical simulations the results of both approaches can be compared. The mentioned resummation methods can make these approximate results competitive ...