From A Wiki of Ice and Fire
The name "Ice" is a legacy from the Age of Heroes, and predates the current sword. About four hundred years before Robert Baratheon's reign, the Valyrian steel greatsword was spell-forged in Valyria and acquired by the Starks, who named it after that legacy. It became the sword of the Lord of Winterfell. Eddard Stark used the sword to personally execute condemned prisoners. After his capture, Ilyn Payne was given the sword and used it to execute Eddard himself. Ilyn carried the blade for a short time until Tywin Lannister took it from him and had Ice re-forged into two longswords, Widow's Wail, and the longsword later called Oathkeeper.