Substitute James Vaughan popped up with the only goal with 17 minutes remaining to give Wigan a narrow Sky Bet Championship victory over Rotherham.
One goal always looked like being enough to decide a tight game of few real chances that Wigan dominated but Rotherham remained in thanks to their impressive fighting spirit.
The Latics started well, and Jon Taylor had to take a booking for bringing down the flying Antonee Robinson in full flow.
Lee Evans' free-kick found Chey Dunkley, but it was an easy save for Marek Rodak.
Robinson was involved again when he raced down the left and crossed towards Will Grigg, who would have had a tap-in had the last defender not got a vital touch.
The set-piece from Evans was again pinpoint and found Callum Connolly, but his header was way wide of the mark.
Rotherham were forced into an early change when Sean Raggett took a heavy blow and could not continue, Clark Robertson coming on in his place.
But the one-way traffic continued as Rodak saved from Connolly, before Josh Windass aimed a free-kick just wide of the post.
Another half-chance for Wigan saw Windass redirect Nick Powell's shot from distance, but the ball still ended up missing the post.
Right on the stroke of half-time, another free-kick from Evans caused alarm in the Rotherham box, with Connolly heading it back across goal and Grigg steering the ball just wide.
After almost total dominance, the first half ended with a scare for Wigan as Michael Smith got a touch on a hopeful free-kick, which fortunately for the home side went straight at Christian Walton.
The visitors immediately offered more at the start of the second period, winning a number of second balls and pushing the hosts further and further back.
Wigan's response was to send on Callum McManaman and Vaughan for Powell and Grigg - and the new-boys were immediately involved.
Vaughan could not quite get on the end of an inviting cross from Reece James, with the ball back in finding Connolly, whose shot was parried out to McManaman, only for the goalkeeper to deny him at point-blank range.
The longer it went without Wigan scoring, the more encouragement Rotherham were getting, and they enjoyed their best spell at the three-quarter mark.
A rasping drive from Kyle Vassell flew inches wide of Walton's far post, with the goalkeeper making another fine stop from the corner which found Smith unmarked.
Walton then denied Ryan Williams from 25 yards with an even better save, before the hosts finally broke through on 73 minutes.
Again it was the substitutes who proved their point to manager Paul Cook, with McManaman's shot being parried out by Rodak, who was unable to prevent Vaughan toeing home the rebound from close range.
Rotherham threw everything at Wigan in the final 15 minutes, but the home defence held firm to secure a three points they just about deserved.