Sophia Bush explained why she left "Chicago P.D." and said she was assaulted in a room full of men who refused to help her.

Bush opened up about being "really unhappy" while working on the NBC series which ultimately led to her to quit the show by season four despite her seven-year contract. The actress said Monday on Dax Shepard's podcast "Armchair Expert" that she programmed herself to "tolerate the intolerable."

"I quit because what I've learned is I've been so programmed to be a good girl and to be a workhorse and be a tugboat that I have always prioritized tugging the ship for the crew, for the show, for the group, ahead of my own health," Bush said. "The reality was that my body was, like, falling apart, because I was really, really unhappy."

Shepard mentioned Bush being placed in a toxic environment while filming "One Tree Hill" with Mark Schwahn, who was accused last December of sexual harassment by more than 40 women. Bush said her situation on the "One Tree Hill" set was different from the experience she endured on "Chicago P.D."

SOPHIA BUSH RECALLS 'MISERABLE' 'CHICAGO P.D.' JOB: 'I FELT TRAPPED'

"Our experience on 'One Tree Hill' was unpleasant, but our boss who was a bad dude lived in L.A.," Bush said. "Eighty percent of the time we were on set loving our experience and each other and then he would come to town and it'd be like, 'Watch out for f—ing Handsy-McHandsy over there.' There was a lot that was inappropriate but it wasn't all the time … it wasn't the same."

Sophia Bush in

Sophia Bush in "Chicago P.D." (NBC)

"One was like, a guy who we're like, 'Oh God, he's back.' And one was a consistent onslaught barrage of abusive behavior," she said about the difference between working on "One Tree Hill" and "Chicago P.D."

SOPHIA BUSH ON RETURNING TO TELEVISION AFTER 'CHICAGO PD': 'I NOW KNOW WHAT A DREAM JOB IS'

The 36-year-old actress then said she was once assaulted in a room full of men while working on the NBC drama.

"You start to lose your way when someone assaults you in a room full of people and everyone literally looks away, looks at the floor, looks at the ceiling — and you're the one woman in the room and every man who's twice your size doesn't do something. You go, 'Oh that wasn’t worth defending? I'm not worth defending?' " Bush said.

The "John Tucker Must Die" star said she grew to love aspects of the show, but working in the cold Chicago weather and getting sick also contributed to her decision to leave the series.

Bush recalled going to her two bosses after the table read of the season four premiere and raising the issues she had on set. She said she told them to make changes or find a replacement, but they responded by saying there was "no way" she would be able to get out of her seven-season contract.

'ONE TREE HILL' CREATOR MARK SCHWAHN ACCUSED OF SEXUAL HARASSMENT BY CAST, CREW

"I said, 'OK, you can put me in the position of going quietly of my own accord or you can put me in the position of suing the network to get me out of my deal and I'll write an op-ed for The New York Times and tell them why,' " Bush said.

Bush added that she found out her complaints had been "hidden" from former NBC president Jennifer Stalke, who later reached out to the actress and said she would've never forced her to stay.

"That I really appreciated," Bush said of Stalke's response.

"I work really hard. I know I have a good reputation. I am not a difficult person to work with," Bush said. "Nearing my tenure there, I was probably difficult to be around because I was in so much pain and I felt so ignored."