Foster, 30, released a letter on his decision to retire via Uninterrupted on Monday.
"There comes a time in every athlete's career when their ambition and their body are no longer on the same page. I've reached that point," Foster wrote.
Foster had been a four-time Pro Bowler for the Houston Texans, but he suffered a torn Achilles tendon in October 2015 and was released the following March after seven seasons in Houston.
He signed a one-year, $1.5 million deal with Miami one week before training camp.
Foster finishes his career with 6,527 rushing yards and 54 touchdowns, and he left Houston as the franchise record holder in rushing yards.
"This game has been everything to me...my therapy, my joy, my solace and my enemy. I've learned to love every facet of this game, from the peak of accomplishment to the gutter of criticism," Foster wrote.
Foster added: "I am walking away in peace. I know it is not commonplace to do it midseason but my body just can't take the punishment this game asks for any longer."
The retirement is effective immediately.
The Dolphins met with Foster in the spring to get an update on his Achilles rehab and kept him on their short list before signing him in July.
Foster won the starting job during the preseason, but his tenure as the starter lasted just two games. Foster injured his groin and a hamstring in Miami's Week 2 loss to the New England Patriots and missed the next three games.
By the time Foster returned in Week 6, he didn't look the same, and Jay Ajayi made significant strides as the starter. Ajayi became just the fourth player in the Super Bowl era to post back-to-back 200-yard games, against the Pittsburgh Steelers and Buffalo Bills.
Barring injury, Foster likely would have been a backup the rest of the season had he not retired.
Texans coach Bill O'Brien learned of his former player's retirement after Houston's 27-9 Monday night loss to the Broncos.
"One of the smartest players that I've coached. Great zone runner, excellent vision, big," O'Brien said at his postgame news conference. "What we found with him was how good he was out of the backfield in the passing game. He was excellent in the passing game, great receiving back, so lot of respect for Arian."
Texans cornerback Johnathan Joseph said: "[Foster] was a great running back with the Texans as far as all time. He was a great, unique guy off the field with some strong beliefs. He had a great frame of mind and I just wish him well in the future. That's the way football works, though. Everybody has a different life span in this league. Obviously he did it for a long time in this league so he really didn't have anything left to prove."
ESPN's James Walker and The Associated Press contributed to this report.