Video footage shows the 23-year-old singer from Whitburn in the Hive nightclub on Niddry Street in the Capital's Old Town last night.
Fans reacted with shock at his presence in one of Edinburgh's most popular clubs, with social media users thanking the popstar for his time and bemoaning the fact they didn't get to meet him.
Another added: "Lewis. Capaldi in Hive? Surely no" while one fan wrote: "Lewis Capaldi is in Hive and I think this might be the peak of 2019."
Others thanked the singer for his time. One said: "Lovely meeting you at Hive tonight lad. Hope you got away from the crowds alright and made it home safe! Can't imagine how hard it is to be that famous at your age. Wish you all the best dude."