Madrid broke through in the 21st minute when Karim Benzema volleyed in a close-range scissor kick off a long Gareth Bale pass from the right.
Ronaldo doubled the lead two minutes later to a deafening roar from the crowd when he collected a deft Toni Kroos chip from midfield and poked in a shot just beyond City goalkeeper Joe Hart.
Pepe made it 3-0 nodding in an Isco corner just before halftime.
City answered in first-half stoppage time with a Yaya Toure penalty, after Sergio Ramos was called for a handball in the box.
Second-half substitute Denis Cheryshev converted an Isco pass to finish the scoring.
City midfielder Fabian Delph, signed from Aston Villa for 8 million pounds ($12.5 million) last week, was carried from the field in the 20th with an apparent hamstring injury. He will have scans on Saturday.
“This injury is not the best news because he was just starting the season with our team, but we’ll see tomorrow,” City manager Manuel Pellegrini said.
The match marked Rafa Benitez’s first win as Madrid manager.
“I’m very pleased,” Benitez said. “When you are working so hard, when the players are training in double training sessions and doing so well in every training session, you can see the commitment.”
Ronaldo had a goal disallowed in the 57th for offside, but video indicated the goal should have been granted.
The crowd of 99,382 was the MCG’s largest for soccer, eclipsing the 95,446 in 2013 for a Liverpool-Melbourne Victory friendly.
The match was the last of the three-game International Champions Cup that also included Roma.