It had all been going according to plan for Marc Lievremont's side at the break at North Harbour Stadium as tries from Julien Pierre, Francois Trinh-Duc and Vincent Clerc opened up a 25-11 advantage.
But Japan, for whom James Arlidge had registered a try and two penalties, launched a stunning fightback as the former Newport Gwent Dragons man knocked over another penalty and cut through for his second five-pointer to put the Cherry Blossoms within four points.
Two-time finalists France were rocking but Lievremont's blushes were spared as Yachvili, who ended with 17 points, kicked his third penalty and Lionel Nallet, Pascal Pape and Morgan Parra crossed late on as Japan tired.
It had looked ominous for Japan, with only one World Cup finals win to their name, when they conceded the first try inside five minutes.
Flanker Raphael Lakafia profited from a turnover to romp clear into space, the ball went loose but found its way to Pierre for the lock to dot down with Yachvili adding the extras.
The second try followed seven minutes later and was tough on Japan as Trinh-Duc picked off a loose pass and streaked away to score, Yachvili was again on target with the conversions.
Arlidge got Japan on the board as he was successful with his second penalty attempt, although Yachvili responded with two of his own for a 20-3 lead.
But Japan were growing in confidence and a bit of good fortune saw Arlidge's attempted grubber rebound into his hands to dash over, although he missed the conversion.
France hit back with a lovely try, made by Yachvili. The scrum-half found Aurelien Rougerie in acres of space and he sent arch finisher Vincent Clerc over for an unconverted try.
Arlidge then landed his second penalty on half-time to keep Japan in touch.
France almost got their bonus-point try two minutes after the break as Fabrice Estebanez, a surprise choice at centre, bust through a tackle to send Imanol Harinordoquy crashing over, but Japan replacement Itaru Taniguchi prevented the Biarritz man grounding the ball.
And more heroic defence stopped Lionel Nallet rumbling over as the minnows battled bravely.
Japan's resistance at one end then paid off at the other as Arlidge took a short ball off scrum-half Fumiaka Tanaka to break a tackle and angle in under the posts, with the fly-half's conversion cutting France's lead to just seven points.
Lievremont sent on David Skrela for Trinh-Duc but France were showing signs of full-scale panic.
Breaks from Hirotoki Onozawa and Tanaka saw Japan camped in Les Bleus' 22, the pressure yielding a third penalty for Arlidge as the locals, who were right behind former All Black John Kirwan's side, howled for an upset.
Skrela quickly departed after appearing to suffer a shoulder problem, with scrum-half Parra being asked to fill the gap.
Yachvili steadied French nerves with his third penalty success with 13 minutes to play and they then killed off the threat of an upset as Nallet bundled over from a wide Yachvili pass to collect a bonus point, with the scrum-half adding a tough touchline conversion.
Cedric Heymans then launched a sharp late attack to allow replacement Pape to stride over before Parra strolled in at the death as Japan ran out of gas.
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The Barbarians are one of the top invitational rugby sides with a long history and classic rugby jersey.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Lions get ready for their matches with this green training jersey. It's what the players wear. Get in the Gear!
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The Lions are ready to get their Australia tour underway. They arrive in Perth on Monday.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.