A widely applicable analytical LC/HRMS method based on ion source optimization, data treatment optimization on rice matrix was developed. The effects of key parameters of ion source, and their interactions on ESI response were studied on HPLC-QTOF. Compared with center points, 40% and 20% increase of response factors in the positive and negative mode can be achieved by ion source optimization, respectively. Data processing strategies inspired from metabolomics and multi-targeted analysis were compared and developed using case and control rice samples. Highly automated workflow using XCMS achieved highest mass accuracy, highest detection rate of 96% for 5 μg/kg in a non-targeted way. A clear distinction between the control and contaminated samples by PCA and PLS-DA was also achieved by this workflow using XCMS, even for the concentration of 5 μg/kg.