The Eringen’s nonlocal elastica equation does not possess a Lagrangian formulation. In this article, we find a variational integrating factor which enables us to provide a Lagrangian and Hamiltonian structure associated to this equation. Explicit expressions of the solutions in terms of elliptic integrals of the first kind are then deduced. We then derive discrete version of the Eringen’s nonlocal elastica preserving the Lagrangian and Hamiltonian structure and compare it with Challamel’s and co-worker definition of a discrete Eringen’s nonlocal elastica.