The present invention relates to a method for producing a medical device and a medical device. The production method comprises a step for heating a device together with a liquid containing a polymer having repeating units (A) and repeating units (B) or a step for bringing a device into contact with a heated solution containing a polyemer having repeating units (A) and repeating units (B). Repeating units (A) are hydrophilic repeating units and repeating units (B) are repeating units having polyoxyalkylene groups in the side chain formed from C5-30 alkyl groups, C5-30 alkanoyl groups, or C6-30 aryl groups.