This study evaluates the reliability of polystyrene/MgAl-layered double hydroxide as a 3D new nanostructure solid phase microextraction fiber coating for extraction and determination the essential oil of Grammosciadium platycarpum Boiss. & Hausskn. growing wild in Maragheh region, East Azerbaijan province, Iran. The Headspace solid phase microextraction coupled with gas chromatography/mass spectrometric method was applied for analyzing of volatile oils. The Headspace solid phase microextraction parameters including the extraction temperature and time, sample weight, and water amount were optimized. The method was compared with traditional hydrodistillation. The analysis of the oils resulted in the identification of 31 compounds. Linalool (57.31 and 61.05%) and α-humulene (5.62 and 4.82%) were found to be the major components, in hydrodistillation and headspace solid phase microextraction methods, respectively. The novel 3D nanostructure fiber coating based on MgAl LDH had the advantages of the strong interaction between analyte and sorbent, simplicity, high thermal stability and more convenient handling than the other traditional SPME fibers. Although to date, SPME devices have been used mainly in laboratory applications, recent research has been directed towards remote monitoring, particularly for clinical, field environmental and industrial hygiene applications.