Aitzaz Hassan, 15, a student in Khyber Pakhtunkhwa province, has become a national hero after he tackled the bomber who had come to attack his school on Monday, at a time when hundreds of students were inside.
Hassan died in hospital after the bomber blew himself up at the school gates. No one else was wounded or killed in the incident.
Malala described him as "brave and courageous".
"I wish that in giving his own life he helps to bring peace to my people and my country," she said.
Malala, who was last year nominated for the Nobel Peace Prize, offered condolences to his family and called for the government to award Hassan its "highest national award".
"His bravery must never be forgotten," she said.
