All new head teachers will need to study for a specially-designed qualification aimed at driving up attainment in schools.
First Minister Nicola Sturgeon said the masters scheme would become mandatory from 2018-19.
She said the announcement – linked to the £100million Scottish attainment challenge scheme which is aimed at helping youngsters from the most disadvantaged communities – reflected the importance of leadership in improving attainment.
Teachers will be able to complete the new qualification from August which has been designed by the Scottish College for Educational Leadership.
The announcement was welcomed by the General Teaching Council for Scotland (GTCS), Scotland’s biggest teachers union the Educational Institute of Scotland. (EIS) and the Scottish Conservatives.
Speaking during a trip to a London school yesterday, Ms Sturgeon also announced a further £1million to create new opportunities for teachers to learn at masters level.
She said: “I want all schools to be led by the best qualified people who are ready to take on the role as head teacher.
“Leadership has played a key role in improving attainment in London schools and just as the rest of the world learns from the best of Scotland’s education system, it is right that we learn the lessons from London and around the world on closing the attainment gap.
“Strong leadership and the best teachers are a fundamental part of improving attainment and achievement for children and young people.”
Ken Muir, chief executive of GTCS, said the new courses would “further strengthen and embed our commitment to high standards across the teaching profession”.
EIS general secretary Larry Flanagan added: “We believe that leadership is vital at all levels of teaching and is encouraged by an additional commitment to funding masters-level learning for teachers.
“The deployment of sufficient numbers of highly trained, highly qualified teachers is essential to support initiatives aimed at raising attainment and tackling the difficulties pupils can face resulting from poverty and inequality.”
Tory education spokeswoman Liz Smith said: “The combination of this new masters programme and compulsory GTCS registration for all teachers will deliver the increased professionalism which parents have a right to expect.”