This research investigates the solubility effect of deep eutectic solvent (DES) mass ratio and ethanol–water solution concentration on corncob lignin extraction. The objective is to propose a solubility matching technique based on like-dissolves-like theory to optimize lignin extraction conditions. The choline chloride (ChCl):lactic acid (LA) mass ratio that maximized lignin extraction was determined by varying DES mass ratio between 1:2 and 1:5, and ethanol–water solution (5–95 % (v/v)) was added to precipitate lignin. By using the solubility matching technique, the maximum lignin extraction was achieved at 1:4 ChCl:LA mass ratio, and 70 % (v/v) ethanol–water concentration yielded the highest lignin precipitation. Lignin is highly soluble where the solubility (δ-values) of lignin, DES, and precipitant are similar. Unlike conventional trial-and-error methods, the solubility matching technique relies on δ-values calculated by the Hildebrand and Scott equation. The proposed technique can also be applied to optimize the extraction conditions of other biomass materials.