Veteran NFL linebacker Randy Gregory is suing the league and one of his former teams.

Gregory's lawsuit against the NFL and the Denver Broncos alleges discrimination over fines that totaled $532,500. 

He was fined for allegedly taking medication containing tetrahydrocannabinol (THC), an active ingredient in marijuana, during his time with the Broncos. Gregory appeared in six games in 2022 and four games in 2023 before he was traded to the San Francisco 49ers.

Gregory said he was prescribed dronabinol for social anxiety and post-traumatic stress disorder, according to a complaint filed in Arapahoe County District Court. However, the pass rusher said he was denied the option to take the prescribed medicine.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Randy Gregory close-up on field

Randy Gregory of the Denver Broncos warms up against the San Francisco 49ers at Empower Field at Mile High Sept. 25, 2022, in Denver, Colo. (Jamie Schwaberow/Getty Images)

The lawsuit argues that denial is discriminatory under Colorado law.

The NFL has made changes to its policies related to THC in recent years. Players who do test positive for THC no longer face suspensions. However, THC is still on the league's banned substances list, which means players could face fines after testing positive.

FANATICS SUES CARDINALS ROOKIE MARVIN HARRISON JR FOR BREACH OF CONTRACT: REPORT

While the Broncos are named in the suit, teams don't have a role in fining players who violate the NFL's substance policies. 

Randy Gregory celebrates

Denver Broncos linebacker Randy Gregory gestures after San Francisco 49ers quarterback Jimmy Garoppolo was tackled for a safety during the second half of a game in Denver Sept. 25, 2022. (AP Photo/Jack Dempsey)

The NFL-NFLPA substance abuse policy is collectively bargained and administered by a jointly appointed third-party medical professional.

The complaint said Gregory was diagnosed with social anxiety disorder in 2021 and with post-traumatic stress disorder in February 2023.

Randy Gregory vs the Texans

Denver Broncos linebacker Randy Gregory during a game against the Houston Texans Sept. 18, 2022, in Denver. (AP Photo/Bart Young, File)

The Broncos and the NFL denied Gregory’s request in March 2023 to use dronabinol during nonwork hours, according to the complaint. Two months later, his agent, Peter Schaffer, requested a therapeutic use exemption for Gregory, which also was denied.

Gregory was selected in the second round of the 2015 NFL Draft. He spent his first five NFL seasons with the Dallas Cowboys. He was suspended multiple times for violating the league's drug policies during his five-year stint with the Cowboys.

CLICK HERE TO GET THE FOX NEWS APP

The Broncos have not pubically commented on the lawsuit. The organization declined to comment when contacted by The Associated Press Friday.

Gregory has recorded 22 sacks over his seven NFL seasons. He signed a contract with the Tampa Bay Buccaneers in April.

The Associated Press contributed to this report.

Follow Fox News Digital’s sports coverage on X, and subscribe to the Fox News Sports Huddle newsletter.