Depending on where you live and the type of chimney you have, you may have problems with trapped animals and birds. Chimney swifts and sparrows frequently build nests in a convenient chimney, and the first indication of their presence is often a chirping sound. This is one situation where prevention is way better than the cure, and once you remove trapped birds or animals you should cap your chimney to make sure you don't have the problem again. This also prevents debris and leaves from clogging your chimney and causing problems with smoke.
Ascertain what the bird or animal is, if possible. Baby raccoons chirp like birds, which can cause confusion. Go outside and watch for birds such as swifts or sparrows flying down your chimney. You may even see them carrying twigs and other nest-building materials. If you suspect there are young birds or animals nesting in your chimney, try to wait until they are mature enough to leave the nest. Raccoons are typically ready in eight to 10 weeks, and chimney swifts or sparrows in three.
Try to tempt birds to leave through the bottom of the chimney. Do not light a fire, as smoke may kill whatever is in the chimney. Open a window and its curtains. Close any doors to the room and block out other light sources. Place a flashlight at the base of the fireplace. The light may entice the birds to fly in that direction and then out the open window.
Look up the chimney if possible. You may see a ledge, near the bottom of the chimney, where birds often nest. It may be possible (while wearing thick gloves) to reach up, grab the bird and release it outside.
Place a pan of ammonia in the fireplace and open the damper half an inch. The ammonia fumes may force mammals out.
Contact your local wildlife rescue centre and ask for the services of a licensed rehabilitator if you are unable to entice or remove the bird or small animal.
Use a chimney cap or screen with quarter-inch mesh hardware cloth to prevent this problem from recurring.