Victory for the Irish was their seventh in succession against the Scots on home soil and a 20th win from the last 25 meetings between the countries, dating back to 2002.
Duhan Van Der Merwe’s second-half score and 11 points from the boot of debutant Jaco Van Der Walt helped keep Scotland in contention but, after early promise, they faded following Duncan Taylor’s 30th-minute sin-binning.
Ireland captain Johnny Sexton, back from a two-match injury absence, kicked 10 points on his return before he once again limped off with a fitness issue.
After a second defeat of the year to England and an underwhelming win over Georgia during an experimental period, Ireland were eager for a response in order to build momentum ahead of next year’s Six Nations, which starts in two months’ time.
Head coach Farrell, whose tenure began with a narrow 19-12 success over the Scots in February, named arguably his strongest available team by making six changes, which included the return of veteran fly-half Sexton.
Scotland also had a fresh face in their number 10 jersey as Gregor Townsend handed a maiden Test appearance to Edinburgh’s South Africa-born playmaker Van Der Walt as one of his six alterations.
Ireland and Scotland went into the game as the only two sides with 100 per cent goal-kicking records in the tournament.
That statistic was wiped out inside 10 minutes as Sexton and Van Der Walt each missed penalties, before the latter put the visitors 6-0 ahead by making no mistake with his next two attempts.
Scotland were all over their opponents and, after a Sexton penalty briefly halved their lead, Van Der Walt restored the six-point advantage with another kick.
Townsend’s men were on a run of 12 successive games without receiving a yellow card but that sequence was abruptly ended on the half-hour mark when Taylor was sin-binned for a deliberate knock-on, allowing Sexton to again reduce the deficit to three points.
Having weathered the early storm, Ireland took advantage of their numerical advantage to go in 11-9 ahead at the interval courtesy of Earls’ 31st international try.
Sexton’s clever kick saw Henshaw challenge the flat-footed Darcy Graham behind the try line and, after the loose ball fell backwards, onrushing winger Earls was on hand to ground and become his country’s outright second highest try scorer, 15 behind Brian O’Driscoll.
Ireland extended their advantage early in the second period with two quickfire scores during incessant pressure.
Experienced prop Healy, with notable assistance from his fellow forwards, powered over to the right of the posts with Sexton adding the extras.
Having already moved one try ahead of retired winger Tommy Bowe, Earls then wasted little time in closing the sizeable gap to former Ireland captain O’Driscoll.
A flowing team move culminated in Peter O’Mahony moving the ball out to the left wing, allowing Earls to dive over in the corner and Sexton to make the scoreline more comfortable with a challenging conversion.
Scotland were in desperate need of a swift response and it arrived courtesy of Van Der Merwe.
The winger burst through the challenge of Rob Herring and had sufficient speed to beat Jacob Stockdale to the line, with Van Der Walt’s kick leaving the scoreboard at 25-16.
Sexton, who suffered a hamstring problem in the opening match of the competition, then departed in clear discomfort.
His deputy Ross Byrne slotted a couple of straightforward penalties to quash any hopes of an unlikely comeback, while Ireland were denied a fourth try in the closing stages when O’Mahony was adjudged to have carried the ball into touch.
While question marks remain over Farrell’s strategy going forward, Ireland’s strong second-half showing should help ease some of the mounting pressure.
Scotland, meanwhile, return home following another fruitless trip across the Irish Sea.