Takei, best known for his role on "Star Trek," posted an apology on Facebook Saturday.

"My choice of words was regrettable, not because I do not believe Justice Thomas is deeply wrong, but because they were ad hominem and uncivil, and for that I am sorry," Takei wrote.

The anger came after hearing Thomas' dissent on the marriage equality ruling in which the judge argued that "slaves did not lose their dignity (any more than they lost their humanity) because the government allowed them to be enslaved. Those held in internment camps did not lose their dignity because the government confined them."

For Takei, who was held in an internment camp during World War II because of his Japanese-American heritage and is a gay rights activist, those words struck the wrong chord.

He remembered in an MSNBC op-ed the moment soldiers sent his family to the camps: "Our bank accounts were frozen, our businesses shuttered ... all because we happened to look like the people who had bombed Pearl Harbor."

He said on Facebook he felt the dissent suggested the government shouldn't be held accountable for slavery or the camps, emphasizing the comment was "not intended to be racist."

This video includes images from Getty Images.