Sterling gave City an early lead and they were 3-0 up at the half-time interval with Phil Foden and a Semi Ajayi own goal adding to their advantage.
An out-of-form Gabriel Jesus extended City's cushion further after the break, Riyad Mahrez finished off a stunning team move and Nicolas Otamendi powered in a header before Leroy Sane wrapped up the scoring.
Jesus missed two great early chances but City led in the 12th minute, Sterling swapping passes neatly with Kevin De Bruyne and darting into the box to finish well.
After Jesus wasted yet another close-range opportunity from De Bruyne's cutback, Rotherham grew into the game with Clark Robertson and Michael Smith missing headers, but City went into the break 3-0 up.
A moment all City fans have dreamt of pic.twitter.com/bp3YxLapMp— Manchester City (@ManCity) January 6, 2019
Foden recorded his first Etihad goal in fortunate fashion as he miscontrolled Ilkay Gundogan's cross, the ball bouncing in off his standing leg, before Ajayi turned a Kyle Walker cross into his own net.
Jesus finally got his goal in the 53rd minute, on hand to tap home Sterling's cross, with Pep Guardiola then handing a club debut to Philippe Sandler.
City had not needed to get out of second gear but they showed their class with a fine goal, Mahrez slotting in Gundogan's pass after Rotherham were sliced open again.
Otamendi rose highest to thump home his first goal of the season from a Gundogan corner and the rout was completed with five minutes to go when Sane's 20-yard drive deflected past helpless goalkeeper Marek Rodak.
What does it mean? City far too good for Millers
A mismatch always appeared likely, with a repeat of City's shock exit at the hands of Wigan Athletic last year never on the cards. Rotherham produced some decent football at times, but also played themselves into trouble on too many occasions.
Sterling shines against outclassed opponents
England international Sterling was City's brightest light with the forward's pace and direct running causing Paul Warne's side problems throughout. A goal and an assist were just rewards for a sharp display and he earned his rest, being replaced early in the second half.
100 - Raheem Sterling has now been directly involved in 100 goals in 167 appearances for Manchester City in all competitions since joining in 2015, scoring 55 and assisting 45. Century. #FACup pic.twitter.com/NGKSviN6LQ— OptaJoe (@OptaJoe) January 6, 2019
Struggling Jesus' form a problem
Given a start with Sergio Aguero among those rested, Jesus did not take his chance to impress. The striker should have had a first-half hat-trick and, even though he did eventually get his name on the scoresheet after the break, his confidence levels look to be at rock bottom.
Key Opta Facts
- After both scoring and assisting today, Sterling has now been directly involved in 101 goals in 167 appearances for City in all competitions since joining in 2015, scoring 55 and assisting 46.
- Sterling has been directly involved in 21 goals in his last 19 appearances at the Etihad Stadium for City in all competitions (11 goals, 10 assists).
- Aged 18 years, 223 days, Foden is the youngest player to score in the FA Cup for City since Rony Lopes scored aged 17 years, 8 days against Watford in January 2013.
- City have scored seven goals in an FA Cup match for the first time since they beat Reading 7-0 in January 1968.
- Today was Rotherham’s heaviest ever defeat in the FA Cup, overtaking their 6-0 loss to Brighton and Hove Albion in February 1960.
City have another cup tie on Wednesday, hosting Burton Albion in the first leg of the EFL Cup semi-final, with Wolves visiting the Etihad five days later in the Premier League. Rotherham have a Championship six-pointer at fellow strugglers Ipswich Town on Saturday.