Removing the battery from a smoke alarm, also called a smoke detector, won't set the unit off and cause it to sound its alarm. Instead, it will likely do the opposite and disable the unit. Because of this, there is really only one reason for you to ever remove the battery.
Smoke Alarm Power Sources
Smoke alarms are powered in either one of two ways. Some units are battery powered, with either a 9-volt battery or a 10-year lithium battery. Without the battery, neither of these units have the power to go off. Other units are hardwired, meaning they are wired into and draw their power from the home or building's electricity. Hardwired alarms often also have a battery backup just in case the electrical power goes out. Take the battery out of one of these and the unit won't go off; it will simply be totally dependent on its AC power.
Invalid Battery Removal Reasons
If a smoke alarm repeatedly sounds false alarms or intermittently chirps, many people often remove the battery to silence the noise. Instead of doing this, you should simply remove the cause of the alarm or move the unit itself to a different spot where smoke from cooking or steam from hot showers won't accidentally set it off. Or open a window to allow in fresh air. A smoke alarm will also chirp or be set off from dust or dead insects that collect inside the unit. Instead of removing the battery, just clean and vacuum out the unit.
When to Remove Batteries
Remove and replace a 9-volt battery from a unit on an annual basis. Also replace the battery each year in hardwired units. Many smoke alarm manufacturers and fire safety associations recommend changing the batteries on the same day you reset your clock in accordance with Daylight Savings Time. A 10-year battery should basically not be replaced because the unit itself is designed to last only 10 years. Install a replacement smoke alarm instead.
Whenever you take the battery out of an alarm to replace it, immediately install the new battery before you have the chance to forget. Leaving the battery out of an alarm puts you in danger in case there is an actual fire. A hardwired alarm will also not put out an alarm if it has no battery and the AC power fails. If the alarm keeps chirping, indicating that the battery is low even though you repeatedly install a new battery and clean the unit, it probably has a loose battery connection. Replace the entire unit.