Radcliffe, 19, wrote the lines in tribute to Rob Knox, 18, who appeared alongside him in the upcoming Harry Potter and the Half-Blood Prince and died in May 2008, after being attacked on a night out with friends.
The touching note was written in the first pages of a copy the sixth in J.K. Rowling's series about the schoolboy wizard, Britain's Sun reports.
Radcliffe's condolence note reads, "We are all proud to have known you and devastated to have lost you. It is terrible just to write this note. Rest In Peace." And he signed it "Dan xxx."
The star also added a line from a letter once sent by D.H. Lawrence: 'To anyone else who reads this remember 'The Dead don't die. They look on and help.' "
'Touched Lives'Rupert Grint, who plays Ron Weasley in the movie series, also added a note, saying, "It was an honour to have known you."
The dead boy's mother, Sally Knox, is quoted as saying, "I treasure it because it was just another example of the way Rob touched lives, another person who met him and liked him."
On Wednesday, Karl Bishop, 22, was found guilty of Knox's murder. He was sentenced Thursday, with a judge saying he would serve a minimum of 20 years.