The 20-year-old midfielder has put pen-to-paper on a three-and-a-half year deal, which will take effect when the transfer window opens on Saturday, at Griffin Park.
MacLeod, who earlier this year earned his first call up to the Scotland national team but has yet to make his debut, has made 20 appearances in all competitions for Rangers this season, scoring eight goals.
"He is a player who can play in all midfield positions, he has two excellent feet and an eye for goal," manager Mark Warburton told Brentford's official website.
"He will be an excellent addition to the playing squad and I am sure he will play a key role in the second-half of the season."
Elsewhere, in the Championship, Fulham's teenage striker Moussa Dembele has signed a one-year contract extension tying him at the club until June 2016.
The 18-year-old made his debut for the club in November 2013 and has gone on to make 12 appearances in all competitions.
Bournemouth have extended the loan of Southampton goalkeeper Artur Boruc until the end of the season, while midfielder Charlie Daniels has extended his contract with Eddie Howe's men until 2017.
At Molineux, Wolves have opted against extending the temporary stay of striker Danny Graham who will return to parent club Sunderland.
Wigan Athletic have also confirmed that Roger Espinoza is to depart the club after almost two years at the DW Stadium, with reports suggesting the Honduran will return to former club Sporting Kansas City in the MLS.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.