The 32-year-old, who has made 596 appearances for the Bees, will also take on coaching responsibilities as part of his new contract.
"Kevin has seen so much significant change at the club and yet has maintained his exceedingly high standards throughout," manager Mark Warburton told the club's official website following the announcement. "It is this outstanding quality that we need to keep at Brentford.
"Kevin will continue his playing career but combine his training and playing duties with his pursuit of the relevant coaching licences and spending time working with both the first team and academy staff.
"We will work closely with Kevin on a day-to-day basis and ensure he is given every opportunity to build a solid foundation for the next stage of his career. However, it is important for me to stress that he will remain a valuable member of the playing squad and his immediate focus will be on preparing himself for competition as and when he is selected."
O'Connor has featured nine times for Brentford this season.