Polymer-like hydrocarbon films were irradiated with 100keV He + or annealed at sample temperatures varying from 25 to 600°C. The effects of sample temperature on the structure and nanohardness of hydrocarbon films are investigated by atomic force microscopy (AFM), AFM-based nanoindentation, Fourier transform infrared spectroscopy, and Raman spectroscopy. Analysis shows that annealing results in the decrease in the nanohardness of hydrocarbon films from 4.0GPa to 0.55GPa while He + irradiation at an elevated sample temperature results in the formation of dense diamond-like carbon films with nanohardness up to 20.0GPa. This indicates that polymer-like hydrocarbon films can be transformed into the hard diamond-like carbon films with a relatively low H content on vacuum vessels of fusion devices due to the energetic bombardments at an elevated wall temperature.