Remove the mantle from the wall by first prying off the trim with a pry bar, then use the pry bar to pull the mantle away from the wall. If the mantle is partly embedded in stone or bricks, use a hammer to gently knock the mantle free.
Separate the top of the mantle -- the shelf section -- from the supports with the pry bar, if possible. If not, use a circular saw to remove the supports, so that only the shelf section remains.
Patch the nail holes in the base, sides and other visible sections of the mantle shelf with wood putty and a spatula. Allow it to dry thoroughly before proceeding.
Sand down the cut and patched areas of the shelf. Vacuum away any debris.
Replace the decorative trim, if desired.