A student, who was recently crowned freshman, opened fire inside the cafeteria of Marysville Pilchuck High School in Washington, at 10:45 am on Friday, local newspapers report.
The student shooter, who has been recognised as Jaylen Fryburg, reportedly shot multiple times, killing his friend before turning the gun on himself. Officials confirmed The Seattle Times that the shooter was killed by a self-inflicted gunshot wound.
Apart from the two killed, four others are also hospitalised, Dr Joanna Roberts of Providence Hospital told CNN. Three of them, who suffered severe head wounds are in critical condition while the fourth one with lesser injuries is transferred to another Medical Centre.
Reports suggest that the shooter had recently fought with another peer over a racist comment.
"He was an angry kid," a student recognised as Allan told MSNBC. "A couple weeks ago they were saying racist things to him and he got in a fight, adding, however, that he had many friends.
"I never knew of him being bullied," Allen said. "He was a popular kid."
Another student, 15-year-old Jarron Webb, told the Seattle Times that one of the students he shot was a girl he wanted to date, but she had rejected him. Among the four students taken to the hospital, two were boys and the rest girls.
Fryber's postings on Twitter are full of regrets and angst, and his most recent post on Thursday morning says, "It won't last...It'll never last..."
"I should have listened...You were right," he wrote in another obscure message earlier in the week.
His other images in social media showed him in joyful moods, playing sports or spending time with his girlfriend. In one of the images, however, he is seen holding the antler of a deer, with a hunting rifle next to him.
However, the gun the shooter used was traced back to his father, CNN further reported.