Smith???s decision does not come as a surprise as the 35-year-old had struggled with injuries but it is yet another blow to a franchise that has had a rough offseason.
Two other defensive stars have also retired in linebackers Patrick Willis and Chris Borland and coach Jim Harbaugh is also gone, along with running back Frank Gore, guard Mike Iupati, receiver Michael Crabtree and cornerback Chris Culliver.
Smith played 14 seasons in the NFL after being drafted fourth overall by the Cincinnati Bengals in 2001.
After seven seasons with the Bengals, he signed as a free agent in San Francisco and had his best success in seven years with the 49ers.
He was a defensive stalwart on a team that made three straight NFC championship games and played in one Super Bowl. Smith is a two-time All-Pro and a five-time Pro Bowler.
???As a football coach, you will always be searching for the next Justin Smith, knowing full well you will never find a player quite like him,??? said 49ers head coach Jim Tomsula.
???Everybody knows about his toughness, durability, and instincts, but his greatest attribute does not get the attention it deserves.
???Justin never concerned himself with personal accomplishments, his unselfish nature made that impossible.
???People like to say ???they broke the mold with him??? but there was never a mold. Justin Smith is a hand-crafted football player.???
49ers CEO Jed York added: ???Justin has earned the respect of the entire NFL community and he will always be remembered as one of the 49ers all-time greats.???