It is difficult to optimize the process parameters of directly preparing carbonaceous mesophase (CMs) by solvothermal method using coal tar as raw material. To solve this problem, a Decision Tree model for CMs preparation (DTC) was established based on the relationship between the process parameters and the yields of CMs. Then, the importance of variables in the preparation process for CMs was predicted, the relationship between experimental conditions and yields was revealed, and the preparation process conditions were also optimized by the DTC. The prediction results showed that the importance of the variables was raw material type, solvothermal temperature, solvothermal time, solvent amount, and additive type in order. And the optimized reaction conditions were as follows: coal tar was pretreated by decompress distillation and centrifugation, the solvent amount was 50.0 ml, the solvothermal temperature was 230 °C, and the reaction time was 5 h. These prediction results were consistent with the actual experimental results, and the error between the predicted yields and the actual yields was about − 1.1%. Furthermore, the prediction error of DTC method was within the acceptable range when the data sample sets were reduced to 100 sets. These results proved that the established DTC for chemical process optimization can effectively lessen the experimental workload and has high application value.