Abstract The problem of a point moving on the surface of an n-dimensional ellipsoid in a conservative field of force is considered. It is shown that if the potential energy terms are inversely proportional to the squares of the distances to the ( n − 1)-dimensional planes of symmetry of the ellipsoid, the problem can be explicitly integrated by using separation variables in elliptic Jacobi coordinates. It has n independent commuting integrals that are quadratic functions of the momenta. If n = 2, an additional integral can be found explicitly by using redundant coordinates. In the limit, when the least semi-axis approaches zero, one obtains a new integrable billiards problem inside the ellipse. Extensions of these results to a space of constant non-zero curvature are discussed.