Stop laying shingles to create a 5-inch radius around the chimney.
Cut a piece of metal flashing with tin snips for the base flashing where the roof slopes away from the chimney. The base flashing should be shaped so it covers 5 inches of the roof at the base of the chimney and extends up the front of the chimney at least 6 inches with two flaps on either side to wrap around the sides of the chimney. Bend the base flashing to fit.
Spread roofing cement under the flashing and press it into place on the roof and chimney. Secure the base flashing to the roof with roofing nails every 5 inches. The roofing cement applied to the back of the flashing will hold it to the chimney on the upper half.
Cut flashing to 6-by-8-inch rectangles for the step flashing.
Bend each piece of step flashing in half lengthwise to form a 90-degree angle.
Attach the step flashing onto the roof and chimney with roofing cement. Overlap each piece of step flashing by at least 3 inches as you move up the roof along the sides of the chimney.
Cut out a top flashing to match the base flashing. Glue it to the roof and chimney with roofing cement.
Spread roofing cement on top of the flashing covering the roof.
Install asphalt shingles up to the base of the chimney covering the flashing. Only nail the asphalt shingles where the nails will not go through the flashing. Press the shingles firmly so they stick to the flashing.