Kier Ashby tagged Harlow MP Robert Halfon in the tweet on 23 June - the night of the EU Referendum.
Ashby - who was told to take his hands out of his pockets - pleaded guilty at Chelmsford Magistrates Court to sending the tweet.
The 21-year-old from Harlow was given a four week prison sentence suspended for one year.
He was also ordered to carry out 120 hours of unpaid community work and pay Â£500 in compensation to Mr Halfon.
The court heard Ashby, who sent the tweet whilst watching a comedy programme, had wanted to become a teacher.
In a statement read to the court, Mr Halfon said he felt "threatened and freaked out" when he read the message.
Denise Holland, prosecuting, said the Conservative MP "checked his doors were locked" and "felt vulnerable".
The tweet came a week after Labour MP Jo Cox was fatally shot and stabbed in Birstall, West Yorkshire.
A man has admitted sending a tweet in which he said he would "love to shoot" an MP in the head.