For several years, gas chromatography-mass spectrometry (GC-MS) has been used to identify gamma-hydroxybutyrate (GHB) in forensic toxicology cases. However, under injector port conditions GHB can dehydrate into gamma-butyrolactone (GBL). Therefore, it is important for GHB to undergo a derivatisation reaction before an analysis to avoid the production of GBL; various analytical methods have been developed for the analysis of GHB but very few methods use acylation as a form of derivatisation. This study explores the optimisation of injector port acylation of GHB to improve its detectability and thermostability. By utilising trifluoroacetic acid anhydride (TFAA) and heptafluorobutyric acid anhydride (HFBA) to enhance the chromatography and mass spectra of the resulting derivatives. As a result, both reagents improved the detectability of GHB, with TFAA producing more predominant peaks within the chromatogram and HFBA offering a more complex mass spectrum. The optimal injector temperature was found to be 240°C for both reagents, which significantly increased the derivatisation yields. These results demonstrate the effectiveness of injector port acylation as an alternative derivatisation route for GHB related drug cases.