The agriculture event in Ingliston marked its 50th year at the site and the 170th year of the show. A total of 187,644 people flocked to the four-day event, beating last year's record total by more than 11,000.
The show also welcomed more visitors on each day compared with 2009. Saturday had an "all-time daily high" of 57,754 visitors, up from last year's 51,307.
Royal Highland Show manager David Dunsmuir said: "We are absolutely thrilled with these figures. Although the fine weather and a focused publicity campaign were obvious influences, there is more to it than that.
"Our core aim is to showcase the farming and food industry and, by combining that with an associated programme of entertainment and activity, we have a formula that is obviously appealing to both our specialist audience and the general public."
Rural affairs secretary Richard Lochhead added: "This has undoubtedly been one of the most successful Royal Highland Shows of all time."
Next year the Royal Highland Show is on 23-26 June.