Mark Laird, 33, was convicted of breach of the peace after a trial in April, and sentence had been deferred for reports.
But back at court on last week, sheriff Ross Macfarlane accused Laird of lying to the social workers drawing up the background reports.
Laird had been the victim of a shooting in Carluke in 2010, and solicitor Archie Hill made much of the effect that the shotgun attack had had on him.
“He was shot in the back, and the boy tried to finish him off by pointing the gun at his head and pulling the trigger, but the gun misfired,” said Mr Hill.
Laird had been lying on the roadside bleeding at that point.
Laird still had pellet scars, but, said Mr Hill, that had also marked the start of his relationship with his former partner, Emma Donnelly, deteriorating.
The court heard that the couple, who had two children, split up in 2013.
The trial heard that Ms Donnelly had moved in with her mother by then, and Laird would drive past their home in Carluke, staring in, leaving her “terrified all the time”.
Laird, now living in Shotts, denied any such incidents had happened, accusing his ex and her family of making the allegations up to stop him having contact with his children, and he continued to deny them when the social worker interviewed him for the background reports.
“He still vehemently denies wrongdoing,” Mr Hill said last Wednesday.
Sheriff Macfarlane jailed Laird for six months, and he also imposed a non-harassment order, barring him from contact with Ms Donnelly or her mother for two years.