Stokes posted an apology note on Twitter on Monday.
In screenshots of the now-deleted posts, Stokes used derogatory terms while referring to “Bieber” (presumably Justin Bieber) and made statements like, “Just because you’re old, doesn’t give you the right to drive like a r****d.”
After the posts resurfaced online, the Netflix star posted a since-deleted apology note on Twitter on Monday, with Stokes indicating he's been hacked "countless times."
"Yes. I will address this,” he wrote in the apology. “I was not hiding. I consulted in one of my closest friends just as anybody else would. I have posted insensitive tweets. My Facebook has been hacked countless times. The picture isn't even of me or anybody I know."
“Again, I am incredibly sorry,” he continued. “I really am. I hope you guys see what i am currently doing and how I am continuing to do the right thing by being respectful in today's climate. This does not excuse my words, nor am I excusing myself. I will continue to work towards using my platform in the same capacity I have been and doing/bringing light into the world.”
Shortly after tweeting the apology, the post was removed, as were all of Stokes’ previous tweets. He then stated that his Twitter password had been changed and he was attempting to get back into his account.
"Yo just getting back into twitter,” he wrote. “My password was changed, figuring things out. I'm really sorry that this is all happening at once."
"Somebody obviously got access to my account. So I'm trying to solve this," he added in another tweet.
Stokes stars as John B. in Outer Banks, a teen drama. In April, he talked to ET about the show's season one cliffhanger, which saw John B. and Sarah fighting for their lives in the middle of the ocean.
"It's cool because depending on what happens, it leaves the entire world of Outer Banks to what could happen next," said the actor, who has also appeared on Stranger Things. "Which is fun -- not just for us as actors, who had the opportunity to kind of explore what could be, but now we know where the gold is, so I think it's an exciting time to give it to the world and say, 'What are John B. and Sarah really going to get into now?' We thought it was dark and dirty then, but it's gonna get real."
See more on Outer Banks below.