The 29-year-old English-born Jamaica international has made 153 appearances for Brentford since signing from Barnsley in 2019.
Pinnock has been crucial in Brentford's rise from the Championship to the top half of the Premier League table.
Pinnock was playing non-league football for Forest Green as recently as 2017.
Bees boss Thomas Frank told the club’s official website: “This is great news for Brentford and I am incredibly pleased that we have Ethan with us for four more years, I am sure our fans are delighted.
“Ethan has been a mountain in defence for us for the last four years. He played a key role in our journey to the top half of the Premier League. He is a top, top player and a great person.
“He has stepped seamlessly in the Premier League and it is an amazing story for him, and for football, that he can progress from non-league to the top of the game so quickly.
“He has proven himself to be a typical Brentford signing, he meets every challenge he faces and we think there is still more development for him.
“Ethan has been so reliable and consistent for us and I am sure that will continue. He will be spending the prime years of his career with us and we look forward to him helping the team be successful in the coming seasons.”
Brentford will complete their season with a home game against champions Manchester City on Sunday.