The visitors broke the deadlock in the 31st minute thanks to a wonderful dead-ball strike from Pennant after James McClean was judged to have been brought down on the edge of Rotherham’s box.
Just five minutes after opening the scoring, the former Stoke man repeated the feat from a near-identical position after Marc-Antoine Fortune was fouled less than two yards outside the area.
Rotherham managed to pull a goal back in the second minute of first-half stoppage time when Matt Derbyshire nodded Ben Pringle’s cross into the back of the net, but Wigan held on to claim three valuable points.
Relegation-battlers Wigan have now won their last four away matches on the spin and sit just six points behind Rotherham.
Mackay was delighted with the result and singled out Pennant for praise.
He said: “Jermaine Pennant’s delivery on both (free-kicks) was sensational.
“It’s not until you look at that and look at it again that you see exactly what he did, and how he has executed those free-kicks.
“Great credit to him for the way that he’s come into the football club and shown great character, personality and humility to come in.”
Rotherham looked dangerous in the second period but failed to find a way past the often-inspired Ali Al-Habsi, who pulled off a remarkable double save from point-blank range two minutes before the end to prevent substitute Jordan Bowery from earning the hosts a point.
Mackay acknowledged the contribution made by his goalkeeper and defence.
He said: “We played our way into the game in the second half and had a couple of chances, but then Bowery comes on and I knew they would do something different.
“I thought my centre-backs stood really firm as far as that was concerned, and barring Al-Habsi’s fantastic double save, they didn’t actually challenge our goal in the second half, so I’ve got to be very, very pleased with the performance.”
Rotherham boss Steve Evans appreciated the brilliance of Pennant’s strikes but was unhappy with referee James Linington’s decision to award the free-kick that led to Wigan’s first goal.
Evans said: “They were two wonderful free-kicks. You can say if the first one is a free-kick, we should give football up. It’s embarrassing for the referee.
“It’s not a free-kick. We have got the benefit of having looked at it and if people want to go diving around and getting free-kicks then Wigan are welcome to them.”
Evans felt his side were not at the races in the first half but improved dramatically in the second period.
He added: “I thought in the first half we were a bit average, if I can use that expression.
“I think in the second half we were fantastic. We put them to the sword but couldn’t find a way to get the second goal.”