Growth came in at 0.5% north of the border, while the union as a whole measured 0.4% between April and June.
The official statistics confirm estimates published in September.
Finance Secretary Derek Mackay said: “Its great news that the positive GDP data published last month - showing Scottish GDP growing and outpacing growth in the UK as a whole - has been confirmed.
“Last week, the State of the Economy report also suggested growth could strengthen further over the next couple of years.
“However, uncertainty relating to the form and timing of agreement for leaving the EU remains a key concern for many sectors of the economy.
“As austerity lingers, the roll-out of Universal Credit continues and the damaging consequences of Brexit remains, the Scottish Government will continue to use all the powers it has to boost the economy and ensure our economic potential is realised.”
In the year since the the second quarter of 2017, the Scottish economy has grown 1.7%, while the equivalent growth UK-wide was 1.3%.