The Why Does It Always Rain On Me? hitmakers performed three songs on a street on Tuesday (20Aug13) before a steward from the Edinburgh Fringe arts event cut short the gig.
Healy had earlier used Twitter.com to tell fans they would be busking in the city, and promised to alert his followers to the surprise venue.
The 40 year old later posted that he could not give information on the location, writing, "(I) Couldn't tweet (sic) the location. We almost got arrested. (We) played three songs then split (sic). Apologies to other performers I set up beside."
A Fringe spokeswoman told Scotland's Daily Record the pair was asked to move as they had set up too close to other performers.
She says, "One of our stewards asked them to move on and they found another spot."
The Scottish band later played at Edinburgh's Hard Rock Cafe.