Vern Cotter’s charges controlled much of the opening period and deserved the 21-10 lead given to them by Henry Immelman, Benjamin Fall and Gabriel Ngandebe tries.
The Scots responded via Stuart McInally’s score and Simon Hickey’s penalty before Dougie Fife reduced the deficit to six points going into the latter stages.
Edinburgh were the better side in the final quarter but they could not fashion the chance that would win them the match as Montpellier held on.
Despite impressing domestically last season, the Frenchmen struggled in Europe and were ousted at the group stage, but they opened this encounter determined to right those wrongs.
Cotter’s men started on the front foot with Ruan Pienaar, in the unfamiliar position of fly-half, directing operations well. The former South African international spotted space in the opposition defence, drew the would-be tackler and sent Immelman over the line.
To the visitors’ credit, they responded excellently and created a superb try. It was instigated by a wonderful Viliame Mata off-load before Henry Pyrgos went surging towards the line. Although the scrum-half was hauled down, McInally was on hand to pick up and touch down from close range to level matters.
Richard Cockerill’s team were playing some good rugby but they were to be undone by two errors. The first came in defence as a couple of missed tackles allowed Fall to go scampering down the right to score before a turnover meant Montpellier could attack once more.
Excellent pace and hands from Nico Janse van Rensburg got the hosts towards the 22 and Pienaar’s cross-field kick was collected and finished by Ngandebe. That gave the home side a comfortable lead at the break, despite Hickey reducing the arrears at the break from the tee.
However, Cockerill’s side began the second period in the ascendency and, under pressure, the Top 14 outfit infringed one too many times, which led to a yellow card for Bismarck du Plessis.
Although Edinburgh were initially unable to take advantage, just before Du Plessis returned they managed to give themselves hope when Mata powered through a tackle and off-loaded for Fife to score.
Montpellier were now struggling for continuity and the visitors pressed in the final 10 minutes for the winning try, but the Frenchmen managed to hold out and secure a crucial victory.
Tries: Immelman, Fall, Ngandebe
Cons: Pienaar 3
Yellow Card: B Du Plessis
Tries: McInally, Fife
Montpellier: 15 Henry Immelman, 14 Benjamin Fall, 13 Vincent Martin, 12 Jan Serfontein, 11 Gabriel Ngandebe, 10 Ruan Pienaar, 9 Enzo Sanga, 8 Louis Picamoles (c), 7 Wiaan Liebenberg, 6 Fulgence Ouedraogo, 5 Paul Willemse, 4 Nico Janse van Rensburg, 3 Jannie du Plessis, 2 Bismarck du Plessis, 1 Mikheil Nariashvili
Replacements: 16 Vincent Giudicelli, 17 Grégory Fichten, 18 Antoine Guillamon, 19 Kevin Kornath, 20 Kelian Galletier, 21 Julien Tomas, 22 Yvan Reilhac, 23 Alexandre Dumoulin
Edinburgh: 15 Blair Kinghorn, 14 Darcy Graham, 13 James Johnstone, 12 Matt Scott, 11 Dougie Fife, 10 Simon Hickey, 9 Henry Pyrgos, 8 Viliame Mata, 7 Hamish Watson, 6 Magnus Bradbury, 5 Grant Gilchrist, 4 Ben Toolis, 3 WP Nel, 2 Stuart McInally (c), 1 Allan Dell
Replacements: 16 Ross Ford, 17 Rory Sutherland, 18 Simon Berghan, 19 Luke Hamilton, 20 Jamie Ritchie, 21 Sean Kennedy, 22 Jaco van der Walt, 23 Chris Dean
Referee: Wayne Barnes (England)
Assistant referees: Matthew O’Grady (England), Paul Dix (England)
TMO: Rowan Kitt (England)