Alan Tilbrook, 63, wrote several threatening comments referring to the All For Unity party leader and posted them on his Twitter page last month.
The comments were reported to the police and Tilbrook, from Musselburgh, appeared at Edinburgh Sheriff Court on Friday where he admitted a charge of uploading threatening messages to social media.
The court heard several comments referring to the murder of Galloway were published on Tilbrook’s Twitter feed over three days last month.
Sheriff John Cook deferred full sentence to next month and Tilbrook was told he was not allowed to approach or contact Mr Galloway in any way.
Tilbrook pleaded guilty to behaving in a threatening or abusive manner by uploading threatening social media messages between March 17 and 19 this year.
Tilbrook uses the Lion rampant as his Twitter avatar and his feed is full of pro-independence and anti-English rants.