Lee Camp was called into action in the first minute to deny Freddie Sears as the forward fired a low effort towards goal, but the Millers keeper made the stop with his legs.
Jonathan Douglas doubled the visitors' advantage with an individual effort as he won the ball back with a crunching tackle in midfield and raided to the edge of the box before firing a low strike into the bottom corner.
Ipswich made it three before half time as Murphy notched his first goal of the season when he was afforded space and time to pick his spot with a powerful left-footed strike.
In the second half, Murphy scored his second of the match as he beat the challenge of Farrend Rawson before drilling a shot past Camp.
Rotherham stemmed the tide when Brandon Barker netted on his debut for the club with an impressive curling strike from distance that found the top corner.
The Millers got another goal back when Matt Derbyshire volleyed the ball into the net from the edge of the box.
However, the Tractor Boys secured the win in the 72nd minute when Murphy notched his hat-trick when he found the bottom corner with a low drive.
Ipswich are 10th in the Championship following their victory in Yorkshire.