Although a smoke alarm is designed to beep as soon as it detects smoke, the beeping doesn't always detect an emergency situation. Sometimes the beeping results from cooking smoke or a problem with the alarm from user error or malfunction. An incorrectly fitted cover, poor battery installation, low battery, alarm malfunction or issues with the backup electrical source can cause the alarm to beep repeatedly. To turn off the beeping in any of these situations, you simply need to disconnect the power source.
Remove the battery cover from your smoke alarm when your smoke alarm begins beeping. If you opened the cover shortly before the beeping started, reattach it to see if the beeping started as the result of an incorrectly fitted cover. If the beeping continues, remove the cover again and set it aside.
Pull the battery from the battery compartment, or disconnect it from connector-style contacts and then pull it from the compartment, and set it aside. If the beeping started after replacing the battery, return the battery to the compartment -- making certain to match up the terminal polarities -- to see if the beeping resulted from incorrect battery placement. If the beeping continues, try a new battery or batteries to see if the beeping started because of a low battery/batteries.
Flip the breaker box switch to the room where the alarm is located if it's connected to a backup electrical system and continues to beep after removing the battery or batteries.
If the beeping didn't stop until you turned off the backup power to the alarm, contact an electrician to check the wiring and alarm for defects.