Plans to expand the Riccarton Campus at Heriot Watt University beat off competition from Dundee and Stirling to host the £30 million centre.
It will support high performance in football, rugby and volleyball and also cater for athletics, badminton, basketball, cricket, fencing, handball, hockey, netball, shinty and squash.
The centre will open in 2016 with room for further expansion at the site if needed.
Deputy First Minister Nicola Sturgeon approved the recommendation from the national performance centre steering group which was chaired by Scottish Football Association chief executive Sewart Regan.
The aim of the centre is to support elite athletes and their development in Scotland.
The Edinburgh centre will feature a replica of the Hampden Park pitch and other outdoor football pitches, as well as two rugby pitches, three tennis courts, a nine court sports hall, an indoor football pitch and a large gym with sports science and medical facilities.
The Scottish international football and rugby teams will prepare for matches at the national centre which has been backed by the likes of Sir Chris Hoy and Gavin Hastings.
Ms Sturgeon said: "The National Performance Centre for Sport will be the jewel in the crown for Scottish sport and help turn dreams into reality. It will be the best place for our elite athletes to mentally and physically prepare to compete on the world stage, helping more Scots win, more often.
"The Heriot Watt and City of Edinburgh Council team presented an inspiring vision which clearly demonstrated a positive commitment to developing high performance and a strong focus on partnership. I am confident they will deliver an iconic project, in a great setting, that takes Scottish sport onto a new level."
The Deputy First Minister said the centre will add to the growing number of top level sporting facilities in Scotland such as the Sir Chris Hoy Velodrome, the refurbished Royal Commonwealth Pool, and Aberdeen Sports Arena.
Stewart Harris, chief executive of sportscotland, said: "Today is a very significant day for sport in Scotland as the National Performance Centre for Sport is a tremendous addition to Scotland's sporting facilities.
"This new multi-sport performance centre will complement the terrific facilities we already have in Scotland, and assist our high performance athletes in honing their skills and delivering on the world stage."
The Stirling plans had been backed by Andy Murray and Sir Alex Ferguson and would have taken in the current facilities at the University of Stirling.
The Dundee bid proposed building a completely new centre in Camperdown Country Park and was backed by the city's two professional football clubs.
Professor Steve Chapman, principal of Heriot-Watt University, said the announcement was "tremendous news".
"We have the go-ahead to create a world class sporting facility, combining the expertise we already have at Heriot-Watt, with a tremendous location, design and setting which have proved a winning formula and will continue to do so for Scotland's up and coming sports men and women.
"I would like to thank everyone who has been involved in our bid, at Heriot-Watt, at the City of Edinburgh Council and all of our external partners, consultants and backers.
"Our real reward, however, isn't winning the bid, but will come when the centre is up and running and we can see it making a real difference to Scotland's sporting future."
Edinburgh Council's sport convener, Richard Lewis, said: "Heriot-Watt University and the capital will provide an excellent home to the next generation of top athletes and those involved in helping them achieve their aims.
"Our bid enjoyed great support from the community and local sport groups will also be able to take advantage of this world-class facility on their doorstep.
"I'm really looking forward to working with Heriot-Watt as they develop their plans in detail ready for future Olympians and cup-winners in 2016."
The new centre has been designed by Scottish architects Reiach & Hall with work due to be completed by 2016.