The problem of construction of the Landau-Ginzburg Hamiltonian starting from the microscopic Hamiltonian is considered. The Hamiltonian near the critical point is assumed to consist of two parts - local and quasilocal. It is shown that there is a nonlinear one-to-one transformation (canonical transformation) of the order parameter field so that the local part of the initial Hamiltonian is reduced to the standard Landau-Ginzburg functional on the canonical order parameter. The proposed transformation conserves the partition function. The coefficients of the constructed Landau-Ginzburg Hamiltonian are definite functions of the initial thermodynamic parameters (the conjugated field and the temperature). The equations determining these coefficients are obtained. This allows to conserve all information about interparticle interaction carried by higher order terms of the initial Hamiltonian which are usually neglected. The results obtained are applied to the Ising model and simple liquids. (C) 2003 Elsevier Science B.V. All rights reserved.