Bruce (58) was born in Winchester and brought up in Hampshire in south-east England, but spent much of his childhood in the north of the Scottish Highlands,where his parents owned the Sallachy Estate near the village of Lairg.
He has received several military awards throughout his long career in the armed forces and still serves as a reservist.
Bruce said in a tweet: "Delighted to be selected as next Governor of Edinburgh Castle by @BritishArmy.
"The Queen, descendant of Robert the Bruce, approved & I will take over in June.
Bruce, full name Alastair Andrew Bernard Reibey Bruce of Crionaich, has also worked as a historical adviser on hit TV shows and films, including Downton Abbey and The King's Speech, and recorded a conversation with Queen Elizabeth II for the BBC in 2017.
The Army in Scotland tweeted to say: "The Army is pleased to announce that the next Governor of Edinburgh Castle will be Brigadier Alastair Bruce of Crionaich OBE VR DL, who will take over this historic role, on promotion to Major General, from Major General Mike Riddell-Webster CBE DSO in summer 2019."
He will take over from Major General ML Riddell-Webster CBE DSO officially in June.