Context. The mechanisms giving rise to diffuse radio emission in galaxy clusters and, in particular, their connection with cluster mergers are still being debated. Aims. We explore the internal dynamics of Abell 2254, which has been shown to host a very clumpy and irregular radio halo. Methods. Our analysis is mainly based on redshift data for 128 galaxies acquired at the Telescopio Nazionale Galileo. We combined galaxy velocities and positions to select 110 cluster galaxies and analyze its internal dynamics. We also used new (g , r , i ) photometric data acquired at the Isaac Newton Telescope, and (V, i ) photometric data available in the Subaru Archive. X-ray data from the XMM-Newton Science Archive were analyzed to study the hot gas component. Results. We estimate the cluster redshift z = 0.177, a high line-of-sight (LOS) velocity dispersion, σ V ∼ 1350 km s −1 , and the X-ray temperature kT ∼ 6.4 keV. Both our optical and X-ray analyses reveal complex dynamical activity. The analysis of the 2D galaxy distribution reveals the presence of two density peaks, one to the east and the other to the west (E and W peaks). Using the full 3D information we detect a high-velocity (ΔV rf,LOS ∼ 3000 km s −1 ), low-mass (σ V ∼ 200-500 km s −1 ) group at the position of the 2D E peak. For the main system we compute a velocity dispersion σ V ∼ 1000-1200 km s −1 . In the assumption of a bimodal system we estimate a mass M sys = 1.5-2.9 ×10 15 h −1 70 M . The X-ray morphological analysis, which is based on power ratios, centroid shifts, and concentration parameter, confirms that Abell 2254 is a dynamically disturbed cluster. The X-ray isophotes are elongated in the east direction, in agreement with a merger in the post core-crossing phase. A simple bimodal model finds that data are consistent with a bound, outgoing subcluster observed a few fractions of Gyr after the core crossing. However, both optical and X-ray analyses suggest that the main system is, in turn, a nonrelaxed structure, indicating north-south as a possible direction for a past accretion. Conclusions. We conclude that Abell 2254, for its mass and merging structure, fits well among the typical clusters with radio halos. We briefly discuss how the particular irregularity of the radio halo might be linked to the complexity of the Abell 2254 structure.