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.