The Kohn-Luttinger envelope-function method is generalized to the case of heterostructures with atomically sharp heterojunctions based on lattice-matched layers of related semiconductors with zinc-blende symmetry. For electron states near the Γ point in (001) heterostructures the single-band effective-mass equation is derived, taking into account both the spatial dependence of the effective mass and effects associated with the atomically sharp heterojunctions. A small parameter is identified, in powers of which it is possible to classify the various contributions to this equation. For hole states only the main contributions to the effective Hamiltonian, due to the sharpness of the heterojunctions, are taken into account. An expression is derived for the parameter governing mixing of states of heavy and light holes at the center of the 2D Brillouin zone.