In this paper, a generalization of the Cahn-Hilliard theory of binary liquids is presented for multicomponent incompressible liquid mixtures. First, a thermodynamically consistent convection-diffusion-type dynamics is derived on the basis of the Lagrange multiplier formalism. Next, a generalization of the binary Cahn-Hilliard free-energy functional is presented for an arbitrary number of components, offering the utilization of independent pairwise equilibrium interfacial properties. We show that the equilibrium two-component interfaces minimize the functional, and we demonstrate that the energy penalization for multicomponent states increases strictly monotonously as a function of the number of components being present. We validate the model via equilibrium contact angle calculations in ternary and quaternary (four-component) systems. Simulations addressing liquid-flow-assisted spinodal decomposition in these systems are also presented.