The former Dons defender was helpless in the 27th minute as Darren Mackie’s volley struck him before speeding past Buddies keeper Mark Howard.
The Saints never really came too close to levelling during a lacklustre Saturday afternoon which allowed the visitors to end a disappointing season on a high.
There was no doubting, though, that this was an end-of-season game.
The Dons came close to opening the scoring in the fifth minute when a Charlie Mulgrew corner from the right was met by Clark Robertson eight yards out but Saints keeper Mark Howard clutched safely at the top corner.
In the 10th minute, with the game still settling down, Saints built a decent move down the right but when on-loan midfielder Graeme Carey fired the ball invitingly across Aberdeen’s six-yard box he found no takers.
A similar cross from the left from left-back Steven Robb in the 20th minute also found the St Mirren strikers wanting.
Moments later Robb fouled Dons skipper Mark Kerr 25 yards from goal and Mulgrew’s curled free-kick forced a fine save from Howard who had to push the ball round the post for another corner which the Paisley side survived.
However, in the 27th minute the Pittodrie men took the lead albeit with more than a little help from their former defender Mair.
Robertson’s looping cross from the left was volleyed towards goal at the edge of the box by Mackie but the ball took a marked deflection off the Saints stopper to spin in to the net with Howard helpless.
Moments later, Paisley striker Billy Mehmet headed Stephen O’Donnell’s cross just past the post from 12 yards with Langfield struggling.
Five minutes before the break Langfield made a good save down at his left from Mehmet, after the former Dunfermline striker had been set up by Robb and the home side failed to capitalise on the corner.
There was some nervousness in the Aberdeen defence in the early moments of the second half but Kerr had a decent effort at the other end which was saved by Howard.
The 4,022 spectators enjoyed the sunshine more than the football which continued to be scrappy but the Saints contingent were again frustrated in the 54th minute when another good cross into the box, this time from midfielder Andy Dorman, found no takers.
Moments later Carey had a powerful left-footed drive from 25 yards saved by Langfield, who studied carefully the flight of the ball as it sped towards him.
A flurry of substitutions took place with Michael Paton and Fraser Fyvie replacing Dominic Gibson and Robertson.
For St Mirren, Michael Higdon, Rory Loy and Craig Dargo came on for Garry Brady, Robb and O’Donnell.
In the 62nd minute Langfield had to block from Loy before he had to make another save from the Buddies’ substitute, this time from a header.
St Mirren were the more positive and aggressive but no closer, it appeared, to drawing level.
In the 74th minute Mulgrew’s whipped-in free-kick from 25 yards was tipped over the bar in spectacular style by Howard, the Dons defender then undoing his good work by sending the resultant corner high past the far post for a goal kick.
A storming finale failed to materialise and the game petered out to conclusion and although it was three welcome points for Mark McGhee’s side, it will be a season they will want to quickly forget.