Mr Eaglesham, aged 46, has been acting depute general secretary and is expected to take over shortly. The election was caused by the death of Alan Lamont, who was general secretary for two years following the death of his predecessor Alex Stanley.
Thirty-seven per cent of members voted and Mr Eaglesham had a majority of 900 over Marie Allan, a former president, who took 20 per cent of the vote. Barbara Clark, the president, had 15 per cent and Bill Guthrie, vice-president, 10 per cent.
Mr Eaglesham, who lives in Linlithgow, is a former principal teacher of modern studies at Cathkin High, Cambuslang, and was Glasgow secretary of the union.