The dynamics of the angular motion of a nanosatellite with a moving unit sliding on a rail platform relative to the main body is considered. The trajectory motion of the center of mass of a nanosatellite is considered as motion in a circular orbit. Sliding of the moving unit in the transverse direction changes the location of the center of mass and the magnitude of the moments of inertia of the system. It is assumed that the sliding of the unit occurs in the presence of friction forces, and can also be performed in accordance with the selected control laws. The presence of internal friction allows performing the dissipation of kinetic energy, and interaction with the external gravitational field ensures the release of the kinetic momentum. This makes it possible the transition of the nanosatellite to a position of stable gravitational equilibrium in the orbital coordinate system. Controlling the position of the unit increases the rate of transition to the gravitational equilibrium position.