Relating to a preparation method of chemical raw materials, the invention provides a method for preparation of methyl glycolate and by-product methyl methoxyacetate with a catalyst. The method adopts methylal as the solvent, s-trioxane, tetrameric or paraformaldehyde and methylal are taken as the source of formaldehyde, H2SO4, HCl and other liquid acids or cation exchange resin, heteropoly acid, impregnation solid acid, solid super acid and other solid acids are employed as the catalyst, one-step synthesis with high conversion rate and high selectivity is carried out to obtain methyl glycolate and the by-product methyl methoxyacetate. In a fixed bed reactor, 300g of an NKC-9 sulfonic acid resin catalyst is used, the raw materials include: 20kg of methylal, 4kg of water and 2.9kg of s-trioxane, the mass space velocity of the raw materials is 30h<-1>, reaction is carried out under a reaction temperature of 130DEG C and a reaction pressure of 6.0MPa, the catalyst is stable without inactivation for 2000h, the methylal conversion rate is 89.83%, the product methyl glycolate has mass selectivity of 28.88%, the methyl methoxyacetate has mass selectivity of 67.68%. The method provided by the invention has the advantages of short synthetic route, high raw material conversion rate or high product selectivity, and the synthesis process has no pollution to the environment.