The averaging theory of first order is applied to study a generalized Yang-Mills system with two parameters. Two main results are proved. First, we provide sufficient conditions on the two parameters of the generalized system to guarantee the existence of continuous families of isolated periodic orbits parameterized by the energy, and these families are given up to first order in a small parameter. Second, we prove that for the nonintegrable classical Yang-Mills Hamiltonian systems, in the sense of Liouville-Arnold, which have the isolated periodic orbits found with averaging theory, cannot exist in any second first integral of class C1. This is important because most of the results about integrability deals with analytic or meromorphic integrals of motion. © 2011 American Institute of Physics.