Food and drink exports from Scotland rose 4.9% to a record high of £6.3 billion in 2018, according to the HMRC figures.
Whisky accounted for three-quarters of Scotland’s total food and drink exports, up 7.8% to £4.7 billion.
The rise in whisky exports made up for a slight decrease across other sectors, although food exports have grown by 125% since 2007.
In January, the Scottish Government said Scotland’s total international and rest of UK exports in 2017 (excluding oil and gas) rose 5.2% to £81.4 billion from the previous year.
Rural Economy Secretary Fergus Ewing said: “Food and drink is one of Scotland’s brightest economic success stories.
“These statistics highlight the importance of the sector’s growth in recent years and are a testament to the unique collaboration between government and industry and the hard work and enterprise of businesses all over Scotland.
“In challenging circumstances, a record high in exports has been achieved – that is great news.”
But he warned of potential damage to Scotland’s exports from Brexit.
He added: “The numbers also highlight the risks that Brexit poses to this success.
“They show that our single biggest trading partner for exports – by some distance – is the EU.
“Should Scotland be pulled out of that community against our will, then the impacts could be hugely disruptive.
“The sector has already estimated huge losses in annual value thanks to the creation of trade barriers and tariffs, as well as the loss of vital migrant workers from Europe.
“Any form of Brexit represents a major threat to the cost and quality of produce exported from Scotland.
“This Government wants our food and drink sector to continue to flourish, at home and in international markets.
“That is why we will keep on making the case for Scotland to remain in the EU – it is our most important market for so many Scottish food and drink products, and we want that to continue into the future.”
James Withers, chief executive of Scotland Food and Drink, said: “The collaborative effort of industry, SDI (Scottish Development International) and Scottish Government to transform our sector’s export performance continues to pay off.
“The strength of Scotland’s brand, the quality of our products and our investment in overseas staff has driven this export success.
“The latest figures demonstrate how valuable the EU market is. It remains the destination for two-thirds of our food exports.
“Our future strategy must rest on building our trade with Europe even further.
“That will strengthen the platform from which we can then continue the remarkable export growth momentum across North America, Asia and the Middle East.”