Facile and potent homogeneous liquid–liquid microextraction via flotation assistance method (HLLME-FA) combined with gas chromatography-mass spectrometry was proposed for determination of trace amounts of myclobutanil in fruit and vegetable samples. The paramount parameters, such as extraction and homogeneous solvent types and volumes, ionic strength and extraction time were studied. Under optimum conditions, the detection limit of 0.005 ng g−1, the linear range of 0.05–100 ng g−1, and the precision of 3.8% were acquired. A three-layer artificial neural network (ANN) model was used with 10 neurons and tan-sigmoid function at hidden layer and a linear transfer function at output layer were developed to predict the process. The results indicated that the proposed ANN model could perfectly predict the process with the mean square error of 0.89%. Then genetic algorithm was utilised to optimise the parameters. The proposed procedure showed satisfactory results for analysis of cucumber, tomato, grape, and strawberry.