Aims. Abundances of the Mg isotopes Mg-24, Mg-25, and Mg-26 can be used to test models of chemical enrichment of interstellar/ intergalactic gas clouds. Additionally, because the position of the Mg II lambda lambda 2796, 2803 angstrom lines is often taken as a reference in computations of possible changes of the fine-structure constant alpha, it should be clarified to which extent these lines are affected by isotopic shifts. Methods. We use a high-resolution spectrum (pixel size approximate to 1.3 km s(-1)) of the quasar HE0001-2340 observed with the UVES/VLT to measure Mg isotope abundances in the intervening absorption-line systems at high redshifts. Line profiles are prepared taking into account possible shifts between the individual exposures. In the line-fitting procedure, the lines of each ion are treated independently. Because of the unique composition of the selected systems-the presence of several transitions of the same ion-we can test the local accuracy of the wavelength scale calibration, which is the main source of errors in the sub-pixel line position measurements. Results. In the system at z(abs) = 0.45, which is probably a fragment of the outflow caused by SN Ia explosion of high-metallicity white dwarf(s), we measured velocity shifts of Mg II and Mg I lines with respect to other lines (Fe I, Fe II, Ca I, Ca II): Lambda V-Mg II = -0.44 +/- 0.05 km s(-1), and Lambda V-Mg I = -0.17 +/- 0.17 km s(-1). This translates into the isotopic ratio Mg-24:Mg-25:Mg-26 = (19 +/- 11):(22 +/- 13):(59 +/- 6) with a strong relative overabundance of heavy Mg isotopes, (Mg-25+Mg-26)/Mg-24 = 4, as compared to the solar ratio Mg-24:Mg-25:Mg-26 = 79:10:11, and (Mg-25+Mg-26)/Mg-24 = 0.3. In the systems at z(abs) = 1.58 and z(abs) = 1.65 enriched by AGB-stars we find only upper limits on the content of heavy Mg isotopes (Mg-25+Mg-26)/Mg-24 <= 0.7 and (Mg-25+Mg-26)/Mg-24 <= 2.6, respectively. At z(abs) = 1.58, we also put a strong constraint on a putative variation of alpha: Delta alpha/alpha = (-1.5 +/- 2.6) x 10(-6), which is one of the most stringent limits obtained from optical spectra of QSOs. We reveal that the wavelength calibration in the range above 7500 angstrom is subject to systematic wavelength-dependent drifts.