The detection of chemical samples having close dielectric response is a big challenge as the detection principle is driven by the variations in the dielectric parameters of the investigated samples. In the current work, a new metamaterial-based sensor is designed and fabricated in order to be used for the detection of liquid chemicals in the frequency range from 8 to 12 GHz. Several designs were tested using genetic algorithm, which is embedded in the CST microwave studio, in order to optimize the desired dimensions of the resonator. The simulation and experimental results showed that the proposed sensor is working well to detect various liquids, including (i) clean and waste transformer oils, (ii) corn, cotton and olive oils, (iii) branded and unbranded diesels and (iv) aniline doped ethyl-alcohol and benzene doped carbon tetrachloride. This was made possible through the occurrence of a shift in the resonant frequency of about 250 MHz, 200 MHz, 250 MHz, 150 MHz and 50 MHz for the aforementioned samples, respectively. The sensing mechanism was interpreted through the surface current and electric field distributions. We believe that the proposed sensor is viable to be used in various applications including liquid chemicals detection and industrial applications. (C) 2020 The Author(s). Published by Elsevier B.V.