Abstract We have used neutron powder diffraction to investigate the defect structure of HgBa 2CuO 4+δ. An interstitial oxygen defect in the Hg plane is the primary doping mechanism. A superconducting transition temperature, T c onset, of 95 K is achieved when ≈0.06 oxygen atoms per formula unit are incorporated at this site by annealing the sample at 500°C in pure oxygen. Annealing in argon at 500°C lowers the oxygen content in this site to ≈0.01 and results in a T c of 59 K. The neutron powder diffraction data give evidence for a second defect in the Hg plane which we conclude involves the substitution of copper for about 8% of the mercury and the incorporation of additional oxygen (≈0.1 atoms per formula unit), presumably bonded to the copper defects. In the present samples, the concentration of this defect does not vary with synthesis conditions and its contribution to doping is, therefore, unclear. The structure of the compound is the same at room temperature and superconducting temperatures.