This paper studies the control of chained nonholonomic systems by using smooth time-varying feedback. First, by using a time-varying state transformation, the chained nonholonomic system is transformed into a linear time-varying system. Second, with the aid of some properties of a class of parametric Lyapunov equations and time-varying systems theory, smooth time-varying state feedback controller is developed to ensure the exponential convergence of both the system states and controls. Different from existing results, the design parameters in the proposed control strategy are independent of the initial conditions of the system. Third, as an application of the proposed smooth time-varying feedback, the attitude control problem for underactuated axisymmetric spacecraft is addressed. Finally, a numerical simulation is presented to validate the effectiveness of the proposed method.