Glasgow Warriors (19) 25
Tries: Morrison Con: Parks Pens: Parks 3, Jackson Drop-goals: Parks 2
Edinburgh (7) 20
Tries: Cross, Cairns Con: Godman, Blair Pens: Godman 2
Morrison claimed Glasgow's only try of the game at Firhill
Glasgow moved up to fourth in the Magners League thanks to victory over Scottish rivals Edinburgh at Firhill.
But it was Edinburgh who won the 1872 Cup, contested annually between the two sides, thanks to the aggregate score.
Glasgow managed just one first-half try from Graeme Morrison, with the bulk of their points from Dan Parks kicks.
Phil Godman's kicking supplemented Geoff Cross and Ben Cairns tries in either half for Edinburgh, but Glasgow deservedly held on for the points.
Edinburgh held the advantage over their rivals after a 39-6 victory at Murrayfield on Boxing Day.
But the cup holders had the better of the early territory in an aggressive match, although it was Edinburgh took the lead after 10 minutes against the run of play through Cross.
The prop picked up a loose ball and exploited a gap in the Glasgow defence to dash under the posts from 11 metres.
Godman converted the simple kick before Parks replied with a penalty for Glasgow to leave the score at 7-3 in favour of the visitors.
And the Scotland stand-off reduced the deficit further to a single point, again from a penalty, after Allan Jacobsen was sin-binned for an over-aggressive clear-out.
Glasgow took the lead after 20 minutes, when Parks directed a drop-kick between the posts as Glasgow continued to press.
But Edinburgh almost scored an unexpected try when Godman's penalty from a wide area hit the crossbar and fell to Simon Webster, with the winger just failing to collect cleanly.
A swift break thanks to good handling from Sam Pinder and Alasdair Kellock was the impetus for the Warriors' only try.
The ball was eventually recycled from five metres to Morrison, who saw off the attentions of three Edinburgh players to dive over the line.
Parks converted and, soon after, added his second drop-goal of the game as the home side took a deserved 19-7 lead into the break.
Glasgow continued to press in the second period, but the normally-reliable Parks failed twice from penalty kicks.
Instead, it was the capital side who notched another six points with two penalties form the boot of Godman.
As the clock ticked down, the Warriors began to kick long to gain quick ground and Parks rediscovered his touch by adding another penalty before his replacement, Ruaridh Jackson, scored another.
In the closing minutes, Edinburgh got their second converted try from a good break by Cairns and, although it is Glasgow who move up to third in the Magners League, Edinburgh won back the 1872 Cup.
Glasgow coach Sean Lineen:
"It was a hard, hard week for everyone connected with the squad in the wake of their heavy defeat at Murrayfield on Boxing Day.
"But I was really proud of the way they acquitted themselves in such difficult circumstances.
"They guys dug deep both physically and mentally and we can now look forward to the rest of the Magners League campaign with some new optimism.
"The players took a long, hard look at themselves after Murrayfield and captain Ally Kellock has done a fantastic job in terms of motivation.
"During the game itself, I thought Sam Pinder was immense at scrum-half, and I was delighted with the efforts of James Eddie and Dan Parks."
Edinburgh coach Andy Robinson:
"The fact the defeat was to our nearest rivals made it harder to take.
"We were back in the match when we scored two penalties in the second half but then lost momentum.
"There is a fine line between aggressive clearing-out at a ruck and the referee deeming Allan Jacobsen reckless. We will look at that on the video."
Glasgow: Stortoni, O'Hare, M. Evans, Morrison, T. Evans, Parks, Pinder, Va'a, Thomson, Low, Barker, Kellock, Eddie, Barclay, Brown.
Replacements: Jackson for Parks (65), Gregor for Pinder (72), Tckachuk for Va'a (70), Hall for Thomson (30), Vernon for Eddie (57).
Not Used: Turner, Henderson.
Edinburgh: Southwell, Robertson, Cairns, De Luca, Webster, Godman, M. Blair, Jacobsen, Ford, G. Cross, Mustchin, J. Hamilton, Newlands, MacDonald, Hogg.
Replacements: Houston for Robertson (54), D. Blair for Godman (65), Laidlaw for M. Blair (68), Kelly for Ford (54), Gissing for Mustchin (41), S. Cross for Newlands (65), Kerr for MacDonald (17).
Ref: R Debney (RFU).