O’Connor has spent his entire career with the Bees after joining the club as a schoolboy before signing his first professional contract in 1999.
The 33-year-old, who only made one appearances this season, scoring the decisive penalty in the Capital One Cup win over Dagenham and Redbridge last August, will remain with the club as the club’s development squad coach.
“I always wanted to stay at Brentford,” O’Connor told Brentford’s website. “I don’t think I could ever have played for another team.
“When I got the offer to stay I was happy and my decision was always going to be to stay at Brentford.
“I would love to carry on playing until I am 35/36 but I don’t think that would happen at Brentford.
“I will miss playing but I am very happy with the role I have.”