Weir only managed an even-par 71 on Sunday to finish the tournament at 17- under-par 267. Maruyama fired a 4-under 67 to finish a shot behind at minus-16.
The pair were tied at 17-under par when they came to the famous closing par-4 at Riviera Country Club. Maruyama's drive landed in the right rough and was not very long. Weir found the fairway and seemed to be in control, but Maruyama hit a good 4-wood just short of the green. Weir, meanwhile, hit a 4-iron left of the green into the rough.
Maruyama, who had almost all of the green to work with thanks to the back-left pin location, chipped his third shot 15 feet past the stick. Weir hit a spectacular pitch, with little green to work with, that ran over the right side of the cup before stopping a foot from the hole.
Maruyama blew his par-saving putt three feet past the hole, then made his bogey putt and watched as Weir tapped in for par to claim his first victory since last year's Masters.
'I thought that was it,' said Weir, referring to his amazing pitch at the last. 'I thought it was a good way to end it. I thought I made it.'
Weir picked up victory No. 7 on the PGA Tour and this was his first win while owning a piece of the 54-hole lead. He also became the first repeat Nissan Open champion since Corey Pavin in 1994-95.
'To win back-to-back, I never expected that,' said Weir, who pocketed $864,000 for the victory. 'It's nice to be mentioned at this tournament as a multiple winner.'
Weir opened Sunday's final round with a five-shot lead and added to it with birdies at one and three. His lead was now seven and seemed insurmountable for the sixth-ranked player in the world but a bogey at the fourth, coupled with a Maruyama birdie at No. 7, and the margin was back to five.
The next swing in momentum came at the 10th when Weir's approach spun back into a bunker. He blasted out to 10 feet, but the par putt died right. Maruyama cashed in an eight-foot birdie putt and the lead was cut down to three.
Weir gave one back at the 13th hole. His approach landed on the fringe and he ran his birdie putt six feet past the stick. Weir's par-saving putt missed right and now Weir was ahead by two at minus-17.
Maruyama then took over with some precise approach shots. At the 15th, he knocked a 2-iron from 211 yards out to two feet and kicked in the birdie putt to trim the margin to one. One hole later, Maruyama played a 6-iron eight-feet over the flag to set up birdie and finally tie Weir for the top spot on the leaderboard.
Both players saved pars after missing the green with their third shots at the par-5 17th, but it was Weir whose short game held up down the stretch.
Weir had owned a share of the 54-hole lead five times before going into Sunday's final round and those five occasions netted zero victories. He held on this time, but Maruyama almost extended Weir's dubious record.
'It was nerve-racking,' said Weir. 'Shigeki was playing very well today. He just played fantastic. I made a couple of mistakes, but other than that I played solid. I hit it right in the middle of the fairway and the smart side of the hole.
'It was a tough day all around. I thought I ended it in big-time style.'
Stuart Appleby shot a 5-under 66 on Sunday to take third place at 14-under-par 270.
John Daly, last week's Buick Invitational winner, birdied the final two holes to shoot a 4-under 67 and finish fourth at minus-13. This marked the first time Daly recorded back-to-back top-fives since Phoenix and the Buick Invitational in 2002.
Hank Kuehne carded a four-under 67 to come in fifth at minus-12, followed by Kirk Triplett, who shot a final-round 68, to post a solo sixth at 11-under-par 273.
Tiger Woods rebounded from a 1-over 72 on Saturday with a 7-under 64 on Sunday. He vaulted into a tie for seventh place with Jay Williamson (64) and J.J. Henry (69) at 10-under-par 274.
'Today I just hit it closer,' said Woods. 'I made a few putts, but more importantly I hit my irons better.'