The motion of a free gyrostat consisting of a platform with a triaxial ellipsoid of inertia and a rotor with a slight asymmetry with respect to the axis of rotation is considered. Dimensionless equations of motion for a system with perturbations caused by the small asymmetries of the rotor are written in Andoyer-Deprit variables. These perturbations result in a chaotic layer in the separatrix vicinity. Heteroclinic and homoclinic trajectories are written in analytical form for gyrostats with different ratios of their moments of inertia. These trajectories are used to construct a modified Melnikov function, and to produce control that eliminates separatrix chaos. The Poincare sections and Melnikov function are constructed via numerical modeling that demonstrates the effectiveness of control.