As a metal-free and visible-light-responsive photocatalyst, graphitic carbon nitride (g-C 3 N 4 ) has emerged as a new research hotspot and has attracted broad attention in the field of solar energy conversion and thin-film transistors. Liquid-phase exfoliation (LPE) is the best-known method for the synthesis of 2D g-C 3 N 4 nanosheets. In LPE, bulk g-C 3 N 4 is exfoliated in a solvent via high-shear mixing or sonication in order to produce a stable suspension of individual nanosheets. Two parameters of importance in gauging the performance of a solvent in LPE are the free energy required to exfoliate a unit area of layered materials into individual sheets in the solvent (ΔG exf ) and the solvation free energy per unit area of a nanosheet (ΔG sol ). While approximations for the free energies exist, they are shown in our previous work to be inaccurate and incapable of capturing the experimentally observed efficacy of LPE. Molecular dynamics (MD) simulations can provide accurate free-energy calculations, but doing so for every single solvent is time-and resource-consuming. Herein, machine learning (ML) algorithms are used to predict ΔG exf and ΔG sol for g-C 3 N 4 . First, a database for ΔG exf and ΔG sol is created based on a series of MD simulations involving 49 different solvents with distinct chemical structures and properties. The data set also includes values of critical descriptors for the solvents, including density, surface tension, dielectric constant, etc. Different ML methods are compared, accompanied by descriptor selection, to develop the most accurate model for predicting ΔG exf and ΔG sol . The extra tree regressor is shown to be the best performer among the six ML methods studied. Experimental validation of the model is conducted by performing dispersibility tests in several solvents for which the free energies are predicted. Finally, the influence of the selected descriptors on the free energies is analyzed, and strategies for solvent selection in LPE are proposed.