A quasi-thermodynamic model accounting for kinetics of molecular nitrogen evaporation is applied to simulate the growth of binary and ternary group-III nitrides using atomic group-III elements and molecular ammonia as the sources. The values of the molecular nitrogen evaporation coefficients from the surface of GaN and AlN necessary for the simulation are extracted from experiments on free evaporation of the crystals in vacuum, while for InN only estimates are available. The growth process of AlN and InN is studied by analyzing the composition of the desorbed vapor species that are thought to influence the native defect formation in group-III nitrides. Different channels of desorption from the surfaces of group-III nitrides (related either to group-III atoms or to their hydrides) are compared. Specific features of the growth processes under the metal-rich and N-rich conditions are analyzed. The developed approach is extended to study the growth of the ternary compounds GaInN and AlGaN. The growth rate of ternary compounds versus temperature shows a two-drop behavior corresponding to the rapid increase of the respective group-III atom desorption. The effect is accompanied by a corresponding stepwise change in the solid phase composition. Factors retarding the growth of ternary compounds — the miscibility gap related to internal strain accumulated in the solid phase due to the lattice mismatch of binary constituents, and the extra liquid phase formation during growth — are discussed with respect to GaInN.