When a high-contrast ultra-relativistic laser beam enters a micro-sized plasma waveguide, the pulse energy is coupled into waveguide modes, which remarkably modifies the interaction of electrons and electromagnetic wave. The electrons that pulled out of walls form a dense helical bunch inside the channel are efficiently accelerated by the transverse magnetic modes to hundreds of MeVs. In the mean time, the asymmetry in the transverse electric and magnetic fields provides significant wiggling that leads to a bright, well-collimated emission of hard X-rays. In this paper, we present our study on the underlying physics in the aforementioned process using 3D particle-in-cell simulations. The mechanism of electron acceleration and the dependence of radiation properties on different laser plasma parameters are addressed. A theoretical analysis model and basic scalings for X-ray emission are also presented by considering the lowest optical modes in the waveguide, which is adequate to describe the basic observed phenomenon. In addition, the effects of high order modes as well as laser polarization are also qualitatively discussed. The considered X-ray source have promising features that might serve as a competitive candidate for future tabletop synchrotron source.