The 49-year-old pleaded guilty at an earlier Blackpool Magistrates' Court hearing to sending unwanted texts and emails to beautician Sarah Kinder after she ended their relationship in March.
Hendry, from Lytham St Annes in Lancashire, was ordered to do 100 hours' unpaid community service.
Earlier this year, he received a 17-month road ban for drink-driving.
Hendry began seeing Miss Kinder following the death of his wife Denise, 42, in 2009 from botched cosmetic surgery.
The harassment began when Miss Kinder broke off their relationship in March.
Hendry admitted making unwanted visits to her home and twice threw stones at her bedroom window to get her attention.
Prosecutor Alison Quanbrough said that Miss Kinder had not wished to give evidence against him, did not want a restraining order and "simply wanted to put the matter behind her".
The content of the messages was not hostile and was "almost affectionate" but the frequency of the contact amounted to harassment, the court heard.
Miss Quanbrough said: "She says she did not feel at any risk from Colin and she does believe now that Colin has accepted the relationship is over.
"She did not want Colin to be arrested and feels the whole episode has been blown out of proportion."
Paul Schofield, representing Hendry, said: "He is determined that this case marks the end of what can be classed as a blip for him, in the last six months in total, and he can assure you - through me - that he will never transgress in any way again."
During his career, Hendry played for Scotland in Euro 1996 and in World Cup 1998.
The central defender was also a member of the Blackburn side that won the Premier League title in 1995.
He also played for Manchester City, Glasgow Rangers, Bolton Wanderers, Coventry and Blackpool.
Since then he has managed Blackpool and Clyde.
Former Scotland captain Colin Hendry has been given a 12-month community order for harassing his ex-girlfriend.