Ellen DeGeneres has taken up the cause of a black Texas high school student who was told he won't be allowed to return to school or attend his graduation ceremony unless he cuts his dreadlocks — and surprised him with a $20,000 scholarship.

DeAndre Arnold, a senior at Barbers Hill High School in Mont Belvieu, appeared in an episode of "The Ellen Show" that aired Wednesday.

At the start of the segment, DeGeneres told Arnold, "I'm sure this is not easy or comfortable for you," referring to his appearing on television. "But I want you to just relax and know that I'm here for you."

"That's why you're here," she continued. "Because I don't understand this."

Grammy Award-winning artist Alicia Keys showed her support by surprising DeAndre Arnold, and together, Ellen and Alicia give him a check for $20,000 to put towards college, courtesy of Shutterfly. Michael Rozman / Warner Bros.

Arnold has said he was suspended over the length of his dreadlocks and told by his principal that he needed to cut his hair to return to school.

"You get good grades," DeGeneres said. "You've never been in trouble, ever. This is the first time anything has come up. And now you haven't been in school for weeks because of this situation."

Stuff We Love Get a daily roundup of items that will make your life easier, healthier and more stylish. This site is protected by recaptcha

Arnold has worn dreadlocks for years and has said he always followed the dress code because he kept his hair off his shoulders, above his earlobes and out of his eyes, by tying up his dreadlocks. He told DeGeneres he was informed he was in violation of the dress code policy after Christmas break.

"Every day I would go to school, I would be in dress code," he told DeGeneres. "But the thing with them is, if it was let down, I would be out of dress code."

DeGeneres asked if there were girls in his school with long hair, to which he responded in the affirmative and said: "There's plenty of girls with long hair at my school. Like, if girls can have long hair, why can't I have long hair."

DeGeneres said that was the point she was trying to make and that she did not understand the school policy as it relates to hair.

"I just personally think you should be able to wear your hair however you want, especially if there's girls with long hair," she said. "What's the difference if girls have long hair and if guys have long hair?"

She said she did not think the policy was fair and asked Arnold to explain why his dreadlocks are important to him.

"It's really important to me because my dad is from Trinidad," he told her, adding that his dreadlocks are part of his culture and heritage. "And I really wish the school would kind of be open to other cultures and just, at least let us try to tell you some things. Don't just shut us out."

DeGeneres agreed. "I think that's what school's supposed to do," she said, "is teach you about other cultures. You're not supposed to teach them. They're supposed to teach you."

African Americans make up 3.1 percent of Arnold's school district's population.

Arnold, who has been out of school for weeks, said if he doesn't cut his hair his only options are in-school suspension or an alternative school for children with behavioral issues.

Barbers Hill High School and the Barbers Hill Independent School District have not responded to multiple requests for comment.

DeGeneres then spoke into the camera and urged officials "to do the right thing."

"I am begging you. This kid is a good kid. He deserves to graduate, to walk with all the other kids," she said. "He's a good guy. I just am urging you to do the right thing. Please."

DeGeneres then invited singer Alicia Keys on stage to award Arnold, who plans to study to become a veterinarian, a $20,000 scholarship for college.

"I want to tell you that, I couldn't believe the story when I heard it," Keys told Arnold. "And I'm super proud of you for standing up for what you know is right. And I know that the school needs to do the right thing."