well, this is a complicated procedure to explain via words. You do need step flashing. You need to dig out the mortar around the chimney roof intersection for the step flashing to groove into then re mortar. You need the other end of the flashing to fit under the existing shingles and to step down the roof line as so to chanel the water off and away.
I would consult some books that show illustrations on how this is done. Its not too difficult, but hard to explain.