Scrub cracked mortar with a wire brush to remove any weak mortar still clinging to the crack.
Load a tube of fireplace mortar into a caulking gun, and cut off the tip of the nozzle at a 45-degree angle with a knife, so the width of the nozzle matches the width of the crack. Fill the crack with steady, even pressure on the caulking gun's trigger. Flatten the repair and scrape away excess mortar with a masonry trowel. Allow the mortar to dry for the time specified by the manufacturer before using the fireplace.
Remove a cracked brick by chiseling the mortar out of the joints around it, using firm taps from a hammer. Pull the brick out once it is loose.
Mix mortar according to packaging guidelines. Spread mortar across the bottom of hollow space with the trowel, matching the width of the existing mortar joints in the fireplace. Spread a layer of mortar with the same width on the top and sides of the replacement brick, and shove that brick into the hollow space. Scrape any excess mortar pushed out of the joints with the trowel. Allow the mortar to set per manufacturer's guidelines before using the fireplace.