Marine sediments were fastly analysed by magnetic SPE coupled with UV–Vis spectrophotometer. Abstract This research describes the application of magnetic molecularly imprinted nano-sized polymers (MMIPs) for the selective extraction and fast detection of malachite green (MG) from marine sediment samples followed by UV–Vis spectrophotometry.