Methyl benzaldehyde was synthesized via in-cell ultrasonic electrosynthesis with xylene mixture as raw material, Mn(Ⅲ) as oxidant and sulfuric acid as the electrolyte. The feasibility of the selective electrosynthesis of methyl benzaldehyde was discussed. The relation between experimental results(i.e. three methyl benzaldehyde isomer ratio of selective synthesis, current efficiency) and experimental conditions(i.e. xylene mixture concentration, sulfuric acid concentration and the current strength) were explored using radial basis function(RBF) neural network and genetic algorithm(GA)in the electrosynthesis process, and moreover, the prediction model was established. The mean squared error goal(Goal) and the spread of radial basis functions values(Spread) of the RBF neural network in prediction model were optimized by GA. Then electrochemical synthesis conditions, whenever 4-methyl benzaldehyde dominated, 2-methyl benzaldehyde and 4-methyl benzaldehyde dominated, or the current efficiency reached highest, were optimized by GA according to prediction model. In accordance with these conditions, the prediction results of model were given as follow: first, the percent content of 4-methyl benzaldehyde dominated was 90.01%; second, the percent content of 2-methyl benzaldehyde and 4-methyl benzaldehyde dominated was 80.38%; third, the percentage of 2-methyl benzaldehyde, 3-methyl benzaldehyde and 4-methyl benzaldehyde were 16.80%, 8.43% and 74.77%, respectively when the current efficiency reached the highest. The corresponding actual experiment results were 90.10%, 79.91% and 17.20%, 8.49%, 74.31%, respectively. The maximum relative error between prediction results and experiment results was less than ±2.24%. It showed that the model’s prediction results were in agreement with experimental results.