X-ray absorption spectroscopy is used to determine the local atomic structure around the iron atom from a soluble synthetic analogue of malaria pigment (hemozoin), cf. ferrimesoporphyrin IX of mesohematin anhydride, in the absence or presence of chloroquine (CQ) in dimethyl sulfoxide (DMSO). Of particular note are the CQ:induced changes in the structure of mesohematin anhydride, which might confirm the formation of CQ-ferrimesoporphyrin IX complex. Examination of solutions of mesohematin anhydride dissolved in DMSO reveals preservation of the dimerlike structure with the central iron atoms of the ferric porphyrin IX reciprocally linked by propionate side chains, which is typical for hematin anhydride (beta-hematin). In the presence of CO, additional light atoms, such as nitrogen, carbon, and oxygen, were detected surrounding the iron in a distance ranging from 2.48 to 3.77 angstrom. The changes introduced by CQ in DMSO are different from that observed in the acetic acid solution.