The invention relates to a process for preparing an ester by alkoxycarbonylation of a C2 to C20 hydrocarbon having at least one multiple bond, preferably having at least one olefinic double bond, in which the homogeneous catalyst system used is separated from the product mixture by means of membrane separation and recycled into the reaction zone. In a development of the present invention, the ester thus formed is converted into another ester by transesterification.