It is shown by inductively coupled plasma atomic emission spectroscopy that elements (Fe, Mn, Cu, Cr, Co, and Ni) are strongly retained in the hydrogel (HG) phase and are virtually not desorbed. A method is developed for the determination of metal ions based on the sorption preconcentration of elements by polymer hydrogels and the subsequent direct analysis of the sorbent by X-ray fluorescence (XRF) spectrometry. It is shown that, to determine the concentrations of elements in the HG after sorption, XRF spectrometry can be used directly on the solid phase, excluding the stage of the desorption and additional sample preparation. The calibration curves are linear in the range 0.05-1.3 mu g/mL. The limits of detection for metals in the solid phase are 0.0002, 0.0003, 0.0002, and 0.0005 wt % for Fe(III), Cr(VI), Cu(II), and Mn(II) ions, which corresponds to the concentrations of these elements in the initial solution 0.007, 0.017, 0.007, and 0.010 mu g/mL. The relative standard deviations are 4.1, 3.2, 4.1, and 5.2%, respectively. The method was tested in the determination of Cr(VI), Mn(II), and Cu(II) in tap water.