The classical pure spinor version of the heterotic superstring in a supergravity and super Yang-Mills background is considered. We obtain the BRST transformations of the world-sheet fields. They are consistent with the constraints obtained from the nilpotence of the BSRT charge and the holomorphicity of the BRST current.