Boston wrapped up its first division title in six years one season after the Red Sox had finished last with 93 losses.
The Red Sox had already ensured themselves at least a wild card berth prior to Friday's victory.
Lester (15-9) held Toronto to a run on five hits with eight strikeouts. The Blue Jays scored twice in the eighth off Junichi Tazawa.
Boston's first two runs came on a wild pitch in the first inning and a bases-loaded walk in the third. The Red Sox then gave themselves some breathing room with a three-run seventh in which David Ortiz had an RBI single and Mike Carp drove in two more with a base hit.
Koji Uehara recorded the final out in the eighth to get Boston out of a jam and worked the ninth as well for his 20th save.
The loss went to Esmil Rogers (5-8), who threw 60 pitches in just 2 1/3 innings while giving up two runs on three hits.
Boston won for the 94th time this season and has the best record in the American League. If the Red Sox remain in that position they will have home field advantage throughout the playoffs, including the World Series.
2014: The Year in Music [PHOTOS]