Quantum feedback is a technique for measuring a qubit and applying appropriate feedback depending on the measurement results. Here, we propose a new on-chip quantum feedback method where the measurement-result information is not taken from the chip to the outside of a dilution refrigerator. This can be done by using a selective qubit-energy shift induced by measurement apparatus. We demonstrate on-chip quantum feedback and succeed in the rapid initialization of a qubit by flipping the qubit state only when we detect the ground state of the qubit. The feedback loop of our quantum feedback method closed on a chip, and so the operating time needed to control a qubit is of the order of 10 ns. This operating time is shorter than with the convectional off-chip feedback method. Our on-chip quantum feedback technique opens many possibilities such as an application to quantum information processing and providing an understanding of the foundation of thermodynamics for quantum systems.