Although the post-Newtonian Lagrangian formalism is widely used in relativistic dynamical and statistical studies of test bodies moving around arbitrary mass distributions, the corresponding general Hamiltonian formalism is still relatively uncommon, being restricted basically to the case of N -body problems. Here, we present a consistent Hamiltonian formalism for the dynamics of test particles in spacetimes with arbitrary energy-momentum distributions in the first post-Newtonian (1PN) approximation. We apply our formalism to orbital motion in stationary axisymmetric spacetimes and obtain the 1PN relativistic corrections to the radial and vertical epicyclic frequencies for quasi-circular equatorial motion, a result potentially interesting for galactic dynamics. For the case of razor-thin disk configurations, we obtain an approximated third integral which could be used to determine analytically the envelope of nearly equatorial orbits. One of the main advantages of this 1PN analysis is the explicit presence of frame-dragging effects in all pertinent expressions, allowing some qualitative predictions in rotating spacetimes. We finish discussing the 1PN collisionless Boltzmann equation in terms of the Hamiltonian canonical variables and its relation with previous results in the literature.