Nicholas Cawthorne, 50, posted a number of threatening letters to staff at North Yorkshire Moors Railway, a heritage steam line that opened in 1836, signing them "David Lake", who is a volunteer engineer for the railway.
Cawthorne, who had a "life-long love" of railways and would often take photographs of the North Yorkshire trains, carried out his harassment campaign to smear Mr Lake's reputation, Leeds magistrates' court heard.
Mr Lake was arrested twice as a result of the letters and his father, who was in the latter stages of terminal cancer, was also taken into custody.
Marie Austin-Walsh, the prosecutor, said that the letters, which were sent in February and March, were abusive and directed against the management. "Some of them are threatening and abusive, some of them make threats to harm passengers and one refers to a bomb being placed on the railway," she said.
Cawthorne was unmasked as the real letter-writer after he sent more correspondence to the company in his own name complaining about Mr Lake.
Ms Austin-Walsh said: "In the letters he describes concerns about Mr Lake, saying he shouldn't be working there and they should get rid of him. He said Mr Lake was insulting people there. These were all false allegations."
Mr Lake said he was "baffled" as to why Cawthorne had a vendetta against him. He said that his father Dennis, who has since died of gastric cancer, had been close friends with Cawthorne since their time working together on the Keighley and Worth Valley Railway, another steam heritage line in Yorkshire, and met twice a week for drinks.
Mr Lake said: "To this day I'm baffled as to why he did this to me. He knew how hard I was finding it looking after my father full-time and he made the decision to make my life so much harder.
"I've no idea why Nicholas would do such a thing, particularly given that he knew my father's condition. The whole thing nearly finished my father off as he had a lot of health problems along with his cancer."
Cawthorne, who pleaded guilty to harassment, was given an indefinite restraining order banning him from contacting Mr Lake or North Yorkshire Moors Railway staff, or travelling on the railway.
He was also given a four-month prison sentence, suspended for 12 months, 100 hours' of unpaid work and ordered to pay Mr Lake £500 in compensation and £85 in court costs. Ghazanfar Iqbal, mitigating, told the court that Cawthorne, who lives with his parents, had suffered a breakdown at the time and wanted to apologise to Mr Lake.