Within an effective field theory method to general relativity, we calculate the fifth-order post-Newtonian (5 PN) Hamiltonian dynamics also for the tail terms, extending earlier work on the potential contributions, working in harmonic coordinates. Here we calculate independently all (local) 5 PN contributions to the tail terms using the in-in formalism, on which we give a detailed account. The five expansion terms of the Hamiltonian in the effective one body (EOB) approach, q 82 , q 63 , q 44 , d5 and a 6 , can all be determined from the local contributions to periastron advance K loc,h ( Ê, j), without further assumptions on the structure of the symmetric mass ratio, ν, of the expansion coefficients of the scattering angle χ k . The O(ν 2 ) contributions to the 5 PN EOB parameters have been unknown in part before. We perform comparisons of our analytic results with the literature and also present numerical results on some observables.