In this paper we study the geodesic flow on nilmanifolds equipped with a left-invariant metric. We write the underlying definitions and find general formulas for the Poisson involution. As an application we develop the Heisenberg Lie group equipped with its canonical metric. We prove that a family of first integrals giving the complete integrability can be read off at the Lie algebra of the isometry group. We also explain the complete integrability for any invariant metric and on compact quotients.Fil: Kocsard, Alejandro. Universidade Federal Fluminense; BrasilFil: Ovando, Gabriela Paola. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Rosario; Argentina. Universidad Nacional de Rosario. F...