The 32-year-old made 49 appearances last season as the Bees made the play-offs, but the midfielder saw the move as too good to refuse.
Brentford boss Martin Allen said: "He has been a fantastic captain, but his family life is most important and I have given him the opportunity to move back North by granting him a free transfer."
The Iron face Brentford on the opening day of the new campaign.