A protection device of a DC-powered nail gun includes collar mounted to a connection rod on the trigger and the collar has an inner diameter larger than an outer periphery of the connection rod so that when the trigger is not pulled, the collar is positioned to pivot a second switch so that the push member of the shooting unit of the nail gun cannot activate an activation button on the second switch when a new battery pack is installed. By the collar and the pivoted second switch, the nail cannot shoot even if the push member is powered and moved by the new battery pack.