Jack Black sang to a terminally ill young fan in a heartwarming video that was shared on social media.

The 53-year-old actor was hosting the Layla Paige and Friends Walk for TrinityKids Care charity event in Rancho Palos Verdes, California, on Oct. 6 when he was introduced to 15-year-old Abraham.

Black was seen smiling and kneeling down to shake hands with Abraham at the beginning of the clip, which was obtained by Fox News Digital.

Upon being told that "School of Rock" was Abraham's favorite movie and "In the End of Time" was his favorite song from the film, Black said, "That's my favorite movie. Thank you."

jack black

Jack Black sang to a terminally ill young fan in a heartwarming viral video. (Getty)

He then went into character and began singing the song to the delighted teen while holding his hand.

JACK BLACK MAY NOT BE RETIRING AFTER ALL: ‘I’M NOT GOING ANYWHERE'

Abraham smiled and nodded along as Black finished his serenade with a flourish while the crowd that had gathered around the two clapped and cheered.

In the 2003 comedy, Black played Dewey Finn, a rock guitarist who poses as a substitute teacher at a prestigious private elementary school. After turning his students into rock-n-roll fans, he forms a new band called "School of Rock" to compete at the Battle of the Bands.

Jack Black as Dewey Finn in 'School of Rock'

Black sang 15-year-old Abraham's favorite song from the movie, "In the End of Time." (Getty Images)

Abraham's mother Veronica told Upworthy that her son's nurse knew that "School of Rock" was his favorite movie and arranged for the teen to meet Black at the event.

"It’s almost been a week since the meet and Abraham is still talking about how he got to meet Jack," Veronica told Upworthy.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

According to the website, Abraham has Pearson syndrome, a rare mitochondrial disease that makes it hard for the body's cells to make energy. 

For the past year, he has been in palliative care at TrinityKids Care, a dedicated pediatric hospice program in Los Angeles and Orange counties.

jack black school of rock

In April, Black told Entertainment Tonight that "School of Rock" was the "highlight" of his career. (Paramount Pictures)

It was the third time that Black hosted the walk, which raises money for Trinitykids Care. 

In addition to his acting career, Black also makes up one half of the Grammy Award-winning comedy rock duo Tenacious D. 

Last April, Black talked about "School of Rock" ahead of the film's 20th anniversary next year. He told Entertainment Tonight, "My best memories are just that group of kids, and how funny and great they were."

"It's definitely the highlight of my career, I can say that. Honestly."

CLICK HERE TO GET THE FOX NEWS APP