A charged particle beam writing apparatus includes an unit to measure height positions of a substrate, an unit to input a position dependent height distribution obtained by converting each position error of a pattern generated depending on each corresponding writing position of the substrate into a value in a height direction, and to add the position dependent height distribution to a height distribution obtained based on the height positions in order to correct the height distribution of the substrate, an unit to calculate a deflection shift amount of a pattern to be written by using a corrected height distribution, an unit to calculate a deflection amount for deflecting a beam to a position where a calculated deflection shift amount has been corrected, and an unit to write a pattern on the substrate by deflecting the beam by a calculated deflection amount.