Mr Robertson secured 52.5% of the vote, defeating fellow MP Tommy Sheppard, who secured 25.5% of votes, MEP Alyn Smith, who took 18.6%, and Inverclyde councillor Chris McEleny, who was backed by 3.4%.
The results were announced at the start of the SNP’s national conference in Glasgow.
Mr Robertson said he was “absolutely bowled over” by the result.
He said: “I think it makes perfect sense for the leadership team of the SNP to be made up by our leader in the Scottish Government and parliament, Nicola Sturgeon our First Minister, and the leader at Westminster.
“I think it makes perfect sense that our leadership team reflects Scotland, Nicola as a fantastic representative of this great city in central Scotland, myself as a parliamentarian living, working and representing in a part of rural Scotland.”
He added: “We are the most effective political party in this country, our strength comes from our members, our branches, our local grass-roots campaigning and our partnership with councillors and parliamentarians.
“We have big challenges ahead and big opportunities.
“We are very, very close to independence and we must start campaigning right now to persuade people who did not vote Yes in 2014.
“I believe that the SNP depute leader has a big job to make this happen and I will work with Nicola Sturgeon to make this happen.”
DOWNLOAD THE SCOTSMAN APP ON ITUNES OR GOOGLE PLAY