Tommy Seymour grabbed two tries on his home debut as Scotland saw off the challenge of improving Japan 42-17 following a flurry of second-half action.
The Glasgow wing's try proved the difference in an uninspiring first half and he crossed again in the 55th minute after the second of Kenki Fukuoka's replies.
Greig Laidlaw had gone over the line after the first of the Japan wing's tries to take him past the 200-point mark in his 22nd Test, and Alasdair Dickinson, Duncan Weir and Sean Lamont, who had a first-half try disallowed, all crossed when the visitors were down to 14 men.
Scotland had struggled to get into their rhythm but the five second-half tries would offer encouragement to head coach Scott Johnson and his watching future successor Vern Cotter, who takes over when his Clermont Auvergne contract expires at the end of the season.
Johnson has been trying to provide more depth to the player pool to give Cotter more resources ahead of the 2015 World Cup and, although he named a largely familiar team, he would have been heartened to see Seymour's fellow home debutant and Glasgow team-mate, Tim Swinson, named man of the match after starting ahead of British and Irish Lions lock Richie Gray.
Scotland scored 100 points in their last official international against Japan in 2004 but their visitors had improved greatly in recent years and beat Wales in the summer. They also had the advantage of match-practice having lost 54-6 to New Zealand the previous week.
Scotland's attempts to play flowing rugby were not helped by the fact that the Murrayfield pitch had been hit by a worm problem in recent weeks, and it was clear in the opening stages that attempts to nullify the infestation with garlic spray had failed.
Japan gave away a scrum on their five-metre line following a lineout offence and the turf cut up badly, not helped by heavy rain earlier in the day.
Japan collapsed the scrum and Scotland took the lead through Laidlaw's seventh-minute penalty after spending the entire game so far in their opponents' half.
But the surface was so bad that two members of ground staff came on with pitch forks to repair the mess left by the scrum when play was at the other end of the park.
There were six people working on the turf in the Scotland end when Laidlaw kicked an 18th-minute penalty against the post after a shuddering tackle by Swinson had helped repel a brief spell of pressure at the other end.
Laidlaw kicked one over from 30 metres five minutes later as Japan continued to concede penalties and scrums when put under pressure.
But the hosts were struggling to get any rhythm in their passing and running game and lost prop Ryan Grant after he took a knee to the head while tackling Japan centre Craig Wing.
Dickinson came on, but Sean Maitland broke through to put Japan under pressure and right wing Seymour crossed in the corner in the 32nd minute after quick passes from Al Strokosch and Ruaridh Jackson.
Ayumu Goromaru got Japan off the mark with a penalty after Laidlaw missed the conversion and the visitors had a let-off with a minute left of the half when Lamont had a try disallowed for an earlier obstruction before Nick De Luca burst past several opponents, following lengthy deliberations by the video referee.
Japan showed they were out to make a game of it less than three minutes into the second half.
Centre Male Sau burst past Jackson in the middle of the park and kept running deep into Scotland territory before moving the ball out to the left. Several passes later and the ball was with Fukuoka, who ran round the outside to cross before Goromaru reduced the deficit to two points with his boot.
Scotland quickly got themselves some breathing space as they forced Japan to defend on their try line.
After some intense pressure, Laidlaw found a gap to dive over before converting himself.
Fukuoka crossed again in the 52nd minute but Scotland responded three minutes later when Laidlaw and Jackson worked the ball out to Seymour to cross.
Gray came on to a huge roar in the 58th minute and Japan number eight Ryu Koliniasi Holani was sin-binned on the hour mark for repeatedly holding on to the ball in a ruck and Scotland took advantage.
Dickinson soon went under the posts after some pressure and Weir celebrated his first international try just before the 10 minutes were up when some nimble play from Maitland on the left wing set him up to burst through.
The teams cancelled each other out when the numbers were evened up until Lamont chased a long kick and forced a mistake from Goromaru, who hauled him down when the ball was loose.
The Japan full-back was shown a yellow card but Scotland had to make do with a penalty rather than a penalty try.
But they again exploited their numerical advantage after kicking into touch. Weir took the ball from the scrum and dinked a ball over the top and Lamont made it his to touch down.