The method involves filling the pores of porous metal object in the to-be-processed surface region, with a liquid material. The phase change to the solid state of aggregation of the material is achieved by the treatment. The molding of the metal object is performed by the machining process. The remaining material in pores is removed by a further treatment in the liquid or gaseous state of aggregation transferred from the pores. The polymerization or cross-linking reaction of polymer is obtained by cooling during the phase change.