A method for producing a medical device, and a medical device are provided, and the production method includes a step of heating a device together with a solution containing a polymer having the following repeating unit (A) and the following repeating unit (B), or a step of bringing a device into contact with a heated product of a solution containing a polymer having the following repeating unit (A) and the following repeating unit (B): (A) a hydrophilic repeating unit; and (B) a repeating unit having a polyoxyalkylene group in a side chain, the terminal of the side chain being composed of an alkyl group having 5 to 30 carbon atoms, an alkanoyl group having 5 to 30 carbon atoms, or an aryl group having 6 to 30 carbon atoms.