The HamiltonianHamiltonian is the energy, which is just one component of a four-vector and therefore not Lorentz invariant.
The LagrangianLagrangian is the Legendre transformLegendre transform of the Hamiltonian and I was wondering if there is some good reason why we get through the LegrendreLegendre transform something invariant?