In this paper we are studying the meromorphic integrability of a two-dimensional Hamiltonian system with a homogeneous potential of degree 6. The approach used in this work is the theory of the Ziglin-Moralez-Ruiz-Ramis-Simo. Within the scope of this theory, the study of such systems is reduced to determining the differential Galois group of a linear differential equation, obtained as a projection onto the tangent bundle of the phase curve of its non-equilibrium solution - Variation Equations (VE). In the case of Hamiltonian systems with homogeneous potentials, the variation equations are hypergeometric. If a standard approach is used to study such a system, it is necessary to calculate a Darboux point, which is not always easy. In this paper we can skip this difficulty by reducing VE to a Legendre equation We use the results for solvability of the Galois group of the associated Legendre equation for study a Hamiltonian system with a homogeneous polynomial potential of degree 6. For the full study, the second variations are used and conditions for a non-zero logarithmic term in their solutions are found.