The two-temperature model (TTM) is commonly used to represent the energy exchange between atoms and electrons in materials under irradiation. In this work we use the TTM coupled to molecular dynamics (TTM-MD) to study swift heavy ion irradiation of Au and W finite nanowires. While no permanent structural modifications are observed in bulk, nanowires behave in a different way depending on thermal conductivity and the electron-phonon coupling parameter. Au is a good heat conductor and it does not transfer energy from electrons to phonons too efficiently. Therefore, energy is quickly carried away from the track so that both electronic and lattice temperatures remain quite uniform across the sample at all times. W has a lower thermal conductivity and a larger electron-phonon coupling, thus supporting an inhomogeneous lattice temperature profile with temperatures well above melting lasting several picoseconds in the irradiated region. Both W and Au nanowires display radiation-induced surface roughening. However, in the case of W there is also sputtering and the formation of a hole in the central part of the wire, purely due to the energy transferred to the atoms by the electrons. The physical mechanisms underlying these findings are rationalized in terms of a combination of sputtering, vacancy formation, and melt flow phenomena. The role of the electron-phonon coupling parameter g is analyzed.