The 23-year-old striker helped the Bees to promotion last season with five goals in 16 starts and manager Karl Robinson is delighted to have brought in the Northern Ireland international.
Robinson told the club's official website: "I'm absolutely over the moon. He's the one I've wanted for the last 12 months.
"When he played against us for Walsall, I thought he was an outstanding talent. He's a name at this level, he's a goalscorer at this level and he's a Northern Ireland international too. He's got the pedigree to come in and do well.
"He's played in a similar system for Walsall and for Brentford, so he's used to the way we play. I don't think he'll need much integration."
However, Robinson admits he is not finished in the transfer market and will be looking to do more business. He said: "That's now two natural-born goal-scorers I've been able to bring in after Tom (Hitchcock) and in my ideal world the third one would be a big man so I can change the way we play."
Before joining Brentford, Grigg played for Walsall for five years during which he was named player of the season in 2013 after scoring 20 goals.
Breaking news, transfer gossip, line ups and goal alerts from your football club - delivered direct to your mobile. Sign up for Sky Sports Alerts