Smoke detectors need checking every month to verify that they work properly. A smoke detector is often your first warning of a fire in the home, and a malfunctioning system does you no good. Smoke detectors often chirp when there is a problem that impedes their function. While a dying battery is the usual cause for this, even in hardwired detectors, it can continue even after you switch the batteries. More thorough troubleshooting is then required to ensure the detector does its job and that it's wired correctly.
Replace the batteries again. The batteries are used as a power backup in a hardwired system, but the detector alerts you when those batteries are running out so you remain protected during a power outage. One of the new batteries could be faulty, so try two other batteries to see if the problem persists.
Press the "test" button on the detector. Nearly every detector has one, and it sends the detector into an alarm state for several seconds to verify that it works. If the test button doesn't do anything, the detector might not be wired correctly or it might have a short.
Take the batteries out entirely to see if the detector continues to chirp. If the chirping stops, the detector is not receiving power through the hardline and it is relying solely on the batteries. Press the test button twice on the detector with the batteries out to reset it. This sometimes corrects the issue and the detector functions properly afterward.
Examine the wires going into the detector. If the wires are loose or if one is discolored, the wiring needs to be redone to get the detector fully functional again.
Replace the smoke detector if it is still not working properly. They generally need to be replaced every 10 years to ensure you always have proper protection.