A reversed-phase high-performance liquid chromatography (HPLC) method was developed for the simultaneous determination in food of biogenic amines and their precursor amino acids after a precolumn derivatization with dansyl chloride. The chromatographic conditions, selected to be suitable for mass spectrometry detection, were optimized through experimental design and artificial neural networks. The HPLC-UV method was validated by comparing the separation results with those obtained through a HPLC method, working under the same chromatographic conditions but employing mass spectrometry detection. The HPLC-UV method was then applied to the analysis of different food samples, namely, cheese, clams, salami, and beer. For all of the matrices, recoveries (relative standard deviation always <5%) always >92% were obtained. The results are discussed as a function of the total biogenic amine content and of the concentration ratio between amines and precursor amino acids.