Andrea Bradley will take up the leading role at the Educational Institute of Scotland (EIS) in the summer.
She succeeds Larry Flanagan, who has been in post for 10 years and announced earlier this year he would be standing down.
Ms Bradley was appointed following a meeting of the EIS council on Friday.
She currently serves as the union’s assistant general secretary and has been in that post for the last seven years.
She was previously a principal teacher of English at South Lanarkshire Council.
Ms Bradley said she does not “under-estimate” the challenges the post will present, with the union recently threatening strike action over a 2% pay offer.
She added: “I am honoured to be chosen as the next general secretary of the EIS, and I look forward to assuming my post in the near future.
I do not under-estimate the challenges that the post of general secretary will present, but I intend to face these head-on.
“In the immediate term, securing a fair pay settlement for Scotland’s teaching professionals will be the top priority for the EIS and I will do all that I can towards achieving this objective.”
Heather Hughes, EIS president, said: “Andrea brings vast experience of Scottish education, and a strong commitment to trade unionism, to the role.
“Scotland’s teachers could not hope for a better appointment, and I look forward to working with Andrea to promote the interests of Scottish education and Scotland’s teaching professionals.”