The forward scored three times to take his total for the season to 61 goals as Carlo Ancelotti's men rounded off the campaign with a ruthless attacking display
Ronaldo's eighth treble of the campaign took his tally for the season to 61 goals in all competitions as he took the Pichichi with 48 strikes, seven more than Barcelona's Lionel Messi.
He was also involved in a moment of history just before the hour mark, when he was replaced by 16-year-old Martin Odegaard, who became Real's youngest ever Liga debutant.
Ronaldo, whose treble completed his most prolific league season, headed Real in front, but Getafe took a shock lead through superb strikes from Sergio Escudero and Diego Castro.
A Ronaldo free-kick and penalty restored Madrid's advantage, but the sides went in level at the break as Mehdi Lacen equalised following a corner.
Quickfire goals at the start of the second half from Javier Hernandez and James Rodriguez put the hosts two clear for the first time, before Jese Rodriguez and Marcelo completed the rout.
An entertaining end-of-season affair ensured that if Carlo Ancelotti is to depart the Bernabeu, he will do so on the back of a crowd-pleasing performance.
After a quiet start to proceedings, Madrid went in front in the 13th minute through a familiar source.
Marcelo delivered a teasing cross from the left, and Ronaldo was left unmarked to power a header beyond Jordi Codina and into the far corner of the net.
But if Madrid thought they were in for a straightforward victory, Escudero and Castro demonstrated that the visitors had other ideas.
With 23 minutes gone, Escudero unleashed a rasping left-foot shot from 30 yards that flew past Iker Casillas into the bottom-right corner and, three minutes later, Castro curled a superb finish into the same portion of the goal from just outside the box.
Getafe's lead lasted just six minutes, however, as Ronaldo took centre stage once more with a fizzing free-kick that curled around the wall and into the bottom-left corner with laser-like accuracy.
And with just 34 minutes on the clock the Portuguese had his hat-trick. Hernandez was bundled to the ground by Carlos Vigaray and Ronaldo made no mistake from the spot, blasting his kick straight down the middle.
Yet as half-time approached back came Getafe, who pulled level once more when Lacen hammered home from eight yards after Real failed to deal with a corner.
The entertainment continued at the start of the second half as Madrid scored twice in the first six minutes.
Hernandez drilled in a rebound after Ronaldo had somehow headed another excellent Marcelo delivery against the woodwork, before Rodriguez curled a stunning free-kick over the wall and into the top-right corner from 25 yards.
The scoring did not stop there, as Jese curled in a sublime finish from the left-hand side of the box after exchanging passes with Rodriguez.
Casillas, who has come in for criticism in recent weeks, was given a rousing ovation by the crowd during a break in play late on and Jese then teed up Marcelo for a simple 90th-minute tap-in as Real took their Liga goals tally to 118 for the campaign.