Intestinal electrical stimulation (IES) and vagus nerve stimulation have been proposed for the treatment of obesity and diabetes. The treatment can be improved if the stimulations are applied immediately after the food intake. The purpose of this study was to develop and enhance the automated food intake detection system using dynamic analysis of heart rate variability via artificial neural network (ANN). The ECG signal was recorded from 34 healthy subjects for 20 min each during following four events: sitting silently, reading, watching emotional movie, intaking food. The HRV parameters were generated from the recorded ECG signal and used to train and test as well as to optimize the ANN for the detection of food intake event. The results of Leave One Subject Out-Leave One Out (LOSO-LOO) with linear, tanh and ReLU were compared in the first step. The best ANN was tested for optimization by removing the input HRV parameters with mutual information score of less than 0.01 and with a decreased number of neurons in the hidden layer. LOSO-LOO, Leave One Subject Out (LOSO), Support Vector Machine (SVM) and Random Forest (RF) algorithms were also compared to identify the best ANN for automatic detection of food intake. The results indicated that (i) tanh algorithm outperformed both the linear and ReLU algorithms. (ii) Removing the input features with low mutual information score (<0.01) increased the performance of the ANN. (iii) The performance of ANN improved further by decreasing the number of neurons in the hidden layer from 10 to 8. (iv) LOSO outperformed both SVM and RF methods. However, LOSO-LOO was even better than LOSO in terms of sensitivity. In conclusion, the ANN using LOSO-LOO with 8 neurons in the hidden layer and 11 HRV features can be used to effectively detect food intake and may be used in a real-time IES system for treating obesity and diabetes.