The molecular and crystal structures of the title compound, C4H4Cl2N2O3, were investigated by single-crystal X-ray diffraction and a Hirshfeld surface analysis. The title compound was synthesized by a new type of reaction using Mg(ReO4)2 as a new catalyst and a possible mechanism for this reaction is proposed. The six-membered ring adopts a half-chair conformation. In the crystal, hydrogen bonds connect the molecules into double layers, which are connected to each other by halogen bonds. The Hirshfeld surface analysis revealed that the most important contributions for the crystal packing are from O…H/H…O (35.8%), Cl…Cl (19.6%), Cl…H/H…Cl (17.0%), H…H (8.3%), C…O/O…C (4.3%), Cl…O/ O…Cl (4.2%) and O…O (4.1%) contacts. © 2020 International Union of Crystallography. All rights reserved.