We present a detailed study of the morphological features of 22 rich galaxy clusters. Our sample is constructed from a cross-correlation of optical (Abell + APM) data with X-ray (0.1–2.4 keV) ROSAT pointed observations. We systematically compare cluster images and morphological parameters in an attempt to reliably identify possible substructure in both optical and the X-ray images. To this end, we compute various moments of the optical and X-ray surface-brightness distribution such as the ellipticities, centre-of-mass shifts and ellipsoidal orientations. We assess the significance of our results using Monte Carlo simulations. We find significant correlations between the optical and X-ray morphological parameters, indicating that in both parts of the spectrum it is possible to identify correctly the dynamical state of a cluster. Most of our clusters (17/22) have a good one-to-one correspondence between the optical and the X-ray images, and about 10 appear to have strong indications of substructure. This corresponds to a minimum percentage of order ∼45 per cent, which is in very good accordance with other similar analyses. Finally, five out of 22 systems (∼22 per cent) seem to have distinct subclumps in the optical which are not verified in the X-ray images, and thus are suspect of being due to optical projection effects. These results will serve as a useful guide in interpreting subsequent analyses of large optical cluster catalogues.