"Islamist extremism is a real threat to our way of life. Act now before we see an Orlando-style atrocity here before too long," read the slogan on a picture featuring what appeared to be Islamic State fighters.
The tweet on the @LeaveEUOfficial account said: "The free movement of Kalashnikovs in Europe helps terrorists. Vote for greater security on June 23. Vote Leave".
The tweet was taken down around an hour later.
In the wake of the recent Paris and Brussels attacks, anti-EU campaigners in Britain also issued warnings about the free movement of arms and fighters in the bloc.
Also Read
Their opponents say that Britain is not part of the EU's Schengen free movement zone and therefore has the border checks to prevent such activity.
Education minister Nicky Morgan, who supports Prime Minister David Cameron on staying in the EU, reacted on Twitter saying: "This is really shameful".
"Our best protection against terror is standing together, whether in Orlando, Paris or Brussels," he tweeted.
Ten days before the referendum, opinion polls indicate that the "Leave" and "Remain" campaigns are neck and neck.