The invention relates to a method for preparation of pentaerythritol and co-production of sodium oxalate. The method comprises the following steps: dissolving formaldehyde, acetaldehyde and sodium hydroxide, carrying out condensation reaction, adding an oxalic acid solution into a reaction liquid after heat preservation of the reaction, cooling, crystallizing, filtering to obtain a first filter material, washing the filtered first filter material, drying to obtain sodium oxalate, removing formaldehyde and methanol from filtered first mother liquor, concentrating, cooling, crystallizing, then centrifugally separating to obtain a second filter material, and washing and drying the second filter material to obtain the pentaerythritol; settling second mother liquor obtained by centrifugal separation, filtering, combining the filtered filter cake into the first mother liquor, adding an oxalic acid solution into the filtered filtrate to adjust the pH value, crystallizing, filtering to obtaina third filter material, and washing and drying the filtered third filter material to obtain the sodium oxalate. The yield of the pentaerythritol in the method provided by the invention is more than or equal to 90%, and the purity of the pentaerythritol in the product is greater than or equal to 95%, the ash content is less than or equal to 0.03%, and the chromaticity of the platinum-cobalt coloris less than or equal to 50; the yield of the sodium oxalate reaches more than 98%, and the purity of the sodium oxalate in the product is greater than 98.5%.