We propose a protocol to protect the quantum states and entanglements from finite-temperature thermal noise via quantum gates. Compared to the common protocols protecting the quantum states and entanglements by using weak measurements and their reversals, no time-consuming weak measurements are needed in the present protocol and consequently, it is much faster. We also discuss the possible implementation of the protocol in cavity QED system.