The fractionation of 10 metals (As, Co, Cr, Cu, Mn, Ni, Pb, Se, V, and Zn) within labile fractions in shallow marine sediments collected from the coasts of Sabah and Sarawak, Malaysia, was evaluated. Spatial distribution revealed that coastal sediments from Sabah were approximately 10% higher in metal content than sediments from Sarawak. Risk assessment code, enrichment factor, and pollution accumulation index calculations were used to investigate the environmental hazards of elements. For the risk assessment code, the modified Tessier sequential extraction procedure was applied. The risk assessment code values showed that metal V recorded the lowest environment risk (~ 10%) while As, Co, Cr, Cu, Mn, and Zn exhibited medium risk (Risk assessment code range of 11%–30%). The element Ni displayed no risk (0.67%) to the environment, whereas Se and Pb recorded the highest risk with values of 47% and 52%, respectively. For the enrichment factor calculation, the continental crust data presented by Taylor (Taylor, Geochim Cosmochim Acta 28:1273–1285, 1964) were used as background, with metal Al used as a reference element. Results illustrated that most of the metals show enrichment (enrichment factor > 1). However, Se was considered extremely severe to the environment (enrichment factor > 50). While the pollution accumulation index calculation demonstrated that all metals under study can be considered as non-contaminant elements except for Ni, V, and Co. These findings indicated that marine sediments in Sabah are more polluted with metal contaminants than the sediments in Sarawak, despite both states having numerous active oil- and gas-related production facilities.