DeCastro was released with a non-football injury designation.
The Steelers later agreed to terms with former Pro Bowl guard Trai Turner on a one-year deal, his agent, Drew Rosenhaus, told ESPN's Adam Schefter.
DeCastro told the Pittsburgh Post-Gazette on Thursday that he needs ankle surgery.
"I have to get surgery on my ankle a third time," DeCastro told the newspaper. "I tried to fix it last year but the bone spurs kept coming back. It nagged me pretty bad all last year."
When asked by the outlet if he still wants to play, DeCastro said, "Gotta see how the surgery goes, but I'd have no problem calling it a day and moving on with my life."
DeCastro didn't participate in minicamp recently. When asked a week ago about DeCastro, coach Mike Tomlin said, "If I thought injury circumstances or reasons why people were not participating were significant, I would share them with you."
DeCastro was in the final year of his contract with a $14.2 million cap hit. Releasing him saves the Steelers $8.75 million in cap space. He was the Steelers' first-round pick (24th overall) in the 2012 draft.
"David was without a doubt one of the premier offensive linemen during his time with us," Steelers general manager Kevin Colbert said in a statement. "He helped us win a lot of football games, but it was David's consistency, reliability and professionalism that stood out more than anything else. We wish him the best moving forward in his career."
DeCastro missed the first two games of 2020 with lingering knee issues but appeared in 13 of Pittsburgh's final 14 games.
With DeCastro's release, the Steelers will have one returning starter on the offensive line: Chukwuma Okorafor, who is likely moving from last season's spot on the right side to left tackle. Kevin Dotson also started for DeCastro a few times last season, but he's slated to be the left guard.
The Los Angeles Chargers released Turner in March after first attempting to trade him. Turner, 28, was limited to nine games last season because of a groin injury, but he said recently he was "back at 100 percent."
Turner had no guaranteed money left on a four-year, $45 million extension he signed with the Carolina Panthers in 2017. He was traded to the Chargers during the 2020 offseason.
Turner was selected to five Pro Bowls in his first six NFL seasons. Chosen in the third round of the 2014 draft by Carolina, he has played in 93 career games with 89 starts.
ESPN's Brooke Pryor and The Associated Press contributed to this report.