Edinburgh, who have only won once away from home since last December, had fly-half David Blair to thank for all 18 of their points.
His opposite number Ruaridh Jackson tallied up 15 points for the victorious Warriors, who have now won four matches in-a-row against Edinburgh.
This particular encounter proved to be a typically feisty affair as referee Andrew Macpherson sent Richie Gray and Ross Ford to the sin-bin in the second half before handing out red cards to Glasgow replacement Chris Fusaro and Edinburgh lock Scott Macleod following a brawl in the dying minutes.
Glasgow made the better start but were punished for early moments of indiscipline as Blair knocked over two penalties to put the visitors ahead.
The home side's cause was further hindered when their Scotland centre Graeme Morrison was carried off after just 13 minutes having sustained an injury in an innocuous-looking tackle.
But Glasgow responded in fine fashion, following up a penalty from Jackson by claiming the game's first try in the 26th minute.
Flanker Rob Harley seized Edinburgh's restart in his own 22 and burst through three tackles before feeding Canada winger van der Merwe, who showed great pace to race in from over halfway for his sixth try of the current league campaign. Jackson's successful conversion made it 10-6.
But Edinburgh battled back as Blair added his third and fourth penalties - one of which was earned by a great break from full-back Jim Thompson - to take advantage of a miss by Jackson from close range and give his side a 12-10 interval lead.
The two fly-halves exchanged penalties early in the second half before Glasgow lock Gray ventured in at the side of a ruck and was sent to the sin-bin. Blair once again took advantage of the indiscretion to make it 18-13.
Edinburgh could not add to their tally while Gray was off the pitch and they then lost a man of their own when hooker Ford saw yellow for infringing, and Jackson cut the gap to just two points.
Sean Lineen's men, who were beginning to look more potent in attack, regained the lead with 10 minutes remaining. Scrum half Colin Gregor freed O'Hare for a run to the posts, and his try was converted by Jackson.
Busy centre Evans then sealed the win six minutes later. He cut the Edinburgh defence apart on a lovely angled run and made his way over by the posts for Jackson to make it a seven-pointer.
There was still time for more drama as referee Macpherson sent Fusaro and MacLeod off after they had squared up to each other off the ball.
After the game, Glasgow boss Sean Lineen said: "It was a real full-blooded derby. Edinburgh tackled hard and made it difficult at contact. They got stuck into us and made their tackles count but we got the result we needed.
"I was proud of what the players did following the Toulouse game. The spirit is strong. Edinburgh will be hurting after that, so it will be another full blooded affair next weekend."
|Glasgow Warriors Score Card|
|DTH van der Merwe||1||5|
|Edinburgh Rugby Score Card|