Roby announced his suspension in a statement Monday on Twitter.
"I apologize to my family, my teammates, the Houston Texans organization and the fans," Roby wrote. "A few months ago I unknowingly used a product that was contaminated with a banned substance by the NFL.
"I recognize that it is my job to know, and be responsible for, everything I put in my body. I will be suspended for six games, ending my season. I will take the necessary steps in the future to prevent this from ever happening again. I look forward to re-joining my teammates next season in our goal to bring a championship to Houston."
Fellow Texans player Will Fuller announced earlier Monday that he also received a six-game ban for a violation of the same policy. Fuller and Roby will miss the Texans' remaining five games and the first game of their 2021 campaign.
Roby, 28, entered the league as the No. 31 overall pick in the 2014 NFL Draft. The Ohio State product played his first five seasons with the Denver Broncos before he signed with the Texans in 2019.
Roby had 37 total tackles, seven passes defensed, two tackles for a loss, an interception and a fumble recovery in 10 starts this season.
He signed a three-year contract extension with the Texans in March and has a base salary of $9.5 million in 2021.