Ellen DeGeneres knew DeAndre Arnold was uncomfortable with the news surrounding his hair. She told the 18-year-old from Mont Belvieu, Tex., to relax, but the debate over whether he should cut his dreadlocks left the daytime host grappling to understand how it could prevent the high school senior from celebrating an important milestone.

“You have good grades,” DeGeneres said. “You don’t do drugs. You don’t do any of that. And they won’t allow you to walk in graduation.”

DeGeneres implored a Texas school district on Wednesday to relax a dress-code policy that would require Arnold to cut his dreadlocks before returning to school and walking at graduation in May.

After a midyear rule change, the Barbers Hill Independent School District in Mont Belvieu told Arnold he would have to trim his long dreadlocks so that they did not fall below his ears. When Arnold refused to chop his locks, his high school suspended him until he changes his mind.

During Arnold’s Wednesday appearance on “The Ellen Show,” DeGeneres stood up for the student’s right to not cut his hair amid a debate that has gained nationwide headlines in recent weeks.

“I am begging you, this kid is a good kid,” DeGeneres said, looking into the camera and speaking to the school district’s administrators. “He deserves to graduate, to walk with all the other kids. He’s a good guy. I am just urging you to do the right thing. Please. Change your mind.”

The daytime host said she thought the school had been unfair when it changed the dress code to bar long hair for boys, even if they kept their hair tied up during the school day. The teen’s mother would cornrow his hair as it grew and tied his locks into a bun to keep it out of his face and off his neck, as The Washington Post’s Lateshia Beachum reported. Arnold, a senior at Barbers Hill High School, had been growing his dreadlocks since seventh grade. Now, he said the school would no longer tolerate the workaround, after it changed its rules last month.

“It’s really important to me because my dad is from Trinidad,” he told DeGeneres during the show. “It’s part of our culture and our heritage, and I really wish the school would kind of be open to other cultures.”

During the show, DeGeneres surprised Arnold, who hopes to become a veterinarian, with a $20,000 scholarship. Singer Alicia Keys joined the pair onstage to give Arnold a giant check and her support.

“I couldn’t believe the story when I heard it,” Keys said to 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.”

Arnold isn’t the only student facing pushback from the school district. His cousin, Kaden Bradford, a 16-year-old sophomore, also refused to cut his hair after the new dress code was adopted. His mother, Cindy Bradford, told NBC News she believes the new policy is “racist.”

After Fox 26 Houston reported the dispute between the school and Arnold’s family, the Barbers Hill Independent School District said on Twitter the school does allow students to wear dreadlocks, but also has a “community supported hair length policy.”

The district has defended its policy, which it said reflects local expectations for students’ appearances.

“Every school district in the nation has a dress code,” Barbers Hill ISD superintendent Greg Poole told KHOU. “I don’t think you can go to school in your underwear.”

So far, the district has stood by its decision despite pushback from celebrities, athletes and politicians.

“BH has received scrutiny regarding our high level of expectations on all things & dress code,” the district tweeted last week. “Yet our African American students beat the state average on passing STAR by 22% & our overall passing scores are the highest in the state. Sounds like high expectations work!”

The district did not immediately respond to a request for comment early Thursday.

Bernice King, daughter of the Rev. Martin Luther King Jr., responded to the school district by criticizing its characterization of Arnold’s hairstyle as unacceptable.

“Deandre’s locks do not reflect ‘lowness’ or a deviation from what should be a ‘high expectation,’" she tweeted.

Several politicians, including Sen. Cory Booker (D-N.J.) and California Gov. Gavin Newsom (D), criticized the school district’s decision while advocating for laws that would bar discrimination based on a person’s hair style.

“Natural hair like dreadlocks is a reflection of culture & heritage,” Booker tweeted. “No one should be punished for expressing who they are.”

The teen told DeGeneres his school district has given him two options if he refuses to cut his hair: in-school suspension or alternative school, a campus for students with behavioral problems.

“I don’t deserve to be grouped with them,” he told DeGeneres. She agreed.

Arnold said he hopes his high school will change its mind and let him graduate with his peers.

“I’ve worked for this all my life. I’ve strived for this,” he said. “I deserve this moment to walk across stage and enter into life. My parents deserve this. . . . They deserve to see me walk across the stage.”