Leaders Burnley could only manage a draw at home against Bournemouth, QPR and Reading cancelled each other out at the Madejski Stadium and Blackpool slipped up against Ipswich, making Forest's 2-0 derby victory at the King Power Stadium all the more valuable.
Cox made the breakthrough after 31 minutes, following up after Kasper Schmeichel parried Jamie Paterson's shot, and Mackie added the second in the 43rd minute when the home side failed to clear a corner.
David Nugent missed a second-half penalty for Leicester, who stay second in the table.
Leaders Burnley remain unbeaten at home but a 1-1 draw with Bournemouth was not the result Sean Dyche would have been seeking for his side.
South African striker Tokelo Rantie fired Bournemouth ahead with a thumping 20-yard finish after 50 minutes, but Clarets frontman Danny Ings headed an 84th-minute leveller against his old club.
QPR joined Leicester on 32 points from 15 games after coming from behind to hold Reading 1-1, with Joey Barton's free-kick in the 78th minute countering Garath McCleary's long-range 62nd-minute opener.
The performance of the day came from Leeds' Scottish striker Ross McCormack as the former Motherwell man fired all of his team's goals in a 4-2 victory at Charlton. Cameron Stewart and Johnnie Jackson netted for the home side.
Fourth-placed Blackpool thought they had pinched a point against Ipswich when Steven Davies made it 2-2 in stoppage time at Bloomfield Road. Yet there was still time for Daryl Murphy to break Tangerine hearts with a last-gasp winner, giving Mick McCarthy's team a 3-2 success.
Stephen Dobbie had earlier put Blackpool in front, but goals from Frank Nouble and Paul Taylor gave Ipswich the 2-1 lead that preceded the late drama.
Birmingham manager Lee Clark returned to his former club Huddersfield to guide his current charges to a 3-1 win, a result marred only for Blues by two-goal defender Kyle Bartley being sent off.
Birmingham led from the 11th minute when Nikola Zigic quietened the home crowd, who were then given cheer by Anthony Gerrard's leveller 20 minutes later.
Bartley restored Birmingham's lead in the 66th minute and his second headed goal, in the 81st minute, prompted the big centre-back to remove his shirt in celebration, leading to his second yellow card and subsequent red.
Derby beat Sheffield Wednesday 3-0 with goals from Jake Buxton, Will Hughes and Chris Martin, while Brighton prevailed by the same margin against Blackburn, with Ashley Barnes netting twice and Jake Forster-Caskey also on target.
Bolton beat Millwall 3-1 to post back-to-back wins for the first time this season. Dougie Freedman's side beat Bournemouth last week and followed up well, with Robert Hall, Jermaine Beckford and Andre Moritz netting at the Reebok Stadium, where Jermaine Easter scored for the Lions.
Barnsley and Doncaster slugged out a goalless South Yorkshire derby, punctuated by a penalty miss in the first half from Chris O'Grady, denied by a save from Ross Turnbull.
A 2-2 draw was played out with Albert Adomah making a 23rd-minute breakthrough, Troy Deeney and Fernando Forestieri edging Watford ahead, and Daniel Ayala heading a stoppage-time equaliser.
- Sports & Recreation
- Jamie Mackie