This paper is concerned with discontinuous output feedback stabilization of a class of nonholonomic systems in port-controlled Hamiltonian forms. First, in order to obtain a dynamic feedback, an integrator is added to the systems via generalized canonical transformations. Second, we will clarify equivalence between asymptotic stability of a state feedback system and that of the corresponding output feedback system. An output feedback stabilization method for this system will be derived based on this equivalence. Furthermore, some numerical examples show the effectiveness of our technique.