The 36-year-old, who last season celebrated his testimonial year at Ashton Gate, has accepted the offer of a new one-year deal.
"I think Louis has an important part to play on the pitch; he'll never let anybody down when he pulls on a Bristol City shirt," said Robins boss Sean O'Driscoll.
"We need to change the dynamic of the team and what happens off the pitch is just as important as what happens on it. Louis will be key to that."
Carey is a product of the club's youth system and made his professional debut in 1995.
He won promotion in 1998 and, after a brief six-month stay at Coventry, returned to Ashton Gate to lead the team to promotion again in 2007.
Carey is just three games away from equalling legendary striker John Atyeo's all-time appearance record of 645 games for the Robins.
- Sports & Recreation