The Bears (1-3) got a win after starting 0-3 for the second time in as many seasons under coach John Fox.
They also stopped a six-game home losing streak as well as a six-game slide against Detroit (1-3), though things got tight near the end.
The Lions dropped their third straight, with Stafford struggling to find open receivers and a short-handed run game once again unable to get going.
Marvin Jones Jr. had 74 yards receiving after setting a career-high with 205 yards against Green Bay the previous week.
Hoyer hit Royal deep down the middle for a 64-yard gain on the next drive, setting up a 6-yard touchdown catch by Miller that increased Chicago's lead to 14-6 with 3:34 left in the third quarter.
Copyright 2016 by The Associated Press