The deal will give Specsavers full naming and branding rights for the County Championship, which will enter its 126th season in April.
Specsavers succeeds insurance brand LV=, which agreed a four-year deal in 2012.
The eyecare retailer has sponsored cricket umpires and been the ECB’s official optometry and hearing partner since 2014.
Specsavers marketing director Richard Holmes said: ‘"This sponsorship builds on our existing sporting pledge to help the experts to see.
"We’re delighted with the levels of exposure we have achieved through our existing relationship with umpires and this is a great way for us to reach out to an even bigger audience of cricket fans nationwide and be a part of one of the game’s most famous and best-loved competitions."