Chauncey Billups had 18 points for Detroit, which has not lost since an 80-77 defeat in Houston on Dec. 12 and owns the longest current run in the NBA.
The Pistons' streak is their longest since winning 11 straight in January 2006. Detroit hosts Eastern Conference-leading Boston on Saturday night.
Hamilton has averaged 21.6 points during the streak and has led the Pistons in scoring in the past seven games. Tayshaun Prince had 10 points and 11 rebounds and Jason Maxiell came off the bench to score 11 points for Detroit.
Chris Bosh had 23 points and 16 rebounds for Toronto, which has lost five of seven.
Andrea Bargnani had 25 points in the first three quarters but missed the only shot he took in the fourth. His career high is 26, set Nov. 30 against Cleveland.
Jose Calderon had 15 points and nine assists and Jamario Moon had 10 points.