It started with a shooting. Danielle Beccan was walking home from the Goose Fair in Nottingham in October 2004 when two men fired from a passing car. The 14-year-old was hit in the stomach and died in hospital. Danielle's only crime was to live in the St Ann's area of the city; the gunmen came from the nearby Meadows district and had driven to St Ann's tooled up and looking for a victim. Danielle was just unlucky: wrong time, wrong place.

Beccan's death was just the latest statistic in the turf and drug wars between rival gangs from the St Ann's, Meadows and Radford areas of inner-city Nottingham. The violence had been escalating since the early 90s; there was a shooting almost every week and Nottingham was getting an unwanted reputation as the UK's gang capital. For Morris Samuels, Beccan's murder was the tipping point.

Samuels had lived all his life in St Ann's and was known as a hard man. He commanded respect. More importantly, though, Samuels was an ex-footballer. He had played for the Notts County junior team and gone on to make a career with semi-professional Ilkeston Town until age and injury caught up with him.

"No one was doing anything to tackle gang crime," he says. "Youth clubs and table tennis don't work with guns and knives. And the police just didn't get it. So I came up with a simple plan: to form a football team from members of all three rival gangs. I reckoned if I could get them playing football together there was a chance they would start talking to one another. And once they were talking to each other, anything was possible."

Samuels called his team Unity and started recruiting players by going down to each of the three estates to try to persuade gang members to give it a go. By 2005 he had 24 lads signed up – 13 from the Meadows, six from St Ann's and the rest from Radford. "I wanted to make the setup as professional as possible," Samuels says. "Much as the lads wanted to play football, they wouldn't have bothered to turn up if I'd only been offering them matches on local park pitches. So I made them all wear shirts and ties to travel – if anyone didn't have them, I bought them for him and if anyone refused to wear them, they got sent home – and we played our first match against Ilkeston Town."

Nathan Kelly was one of the first to sign up. He was 15, had just been kicked out of school for beating up the head teacher and was on a one-way ticket to the Pupil Referral Unit. In his own words he was "a rebel, a total nightmare". The only thing that made him happy was football: so he reckoned he'd check out Unity.

"Being in a dressing room with people I'd have ordinarily wanted to smack was hard at first," he says. "There was a lot of bullshitting going on. But Morris was brilliant at keeping it under control, telling us we were really all the same and that we stood no chance of winning a game if we were fighting amongst ourselves. The rivalry thing has all gone for me now and I've got a job I love, teaching sport in school, working one to one with disabled kids and training to be a gym instructor."

Unity got off to a slowish start as no organisations wanted to get involved. Samuels even stumped up £1,000 of his own money to get the kit. That changed after Unity played a game against Nottingham Forest that made the local BBC news and attracted the attention of Crime Concern and the Rainer Foundation, which have since merged into the young persons charity Catch 22. Unity now runs three programmes – seniors aged 17-25, juniors aged 11-16 and girls aged 11-25 – and has more than 800 young people on its books.

Football is the hook that lures everyone in but it's not Samuels's underlying aim. That is both to break the gang culture and give kids a chance to pick up qualifications and training they were not getting anywhere else. Before every game there is a compulsory session in the classroom, teaching anything from personal and social education – sex, drugs and domestic violence all feature strongly – to maths and English for the younger kids. For the older age group, there are training courses in sport, car maintenance and being a bouncer.

"Obviously we've got a lot of social problems round here so you have to be tactful," Samuels says. "But my basic message is that I will be 100% on the case of anyone who isn't on a course, in training or volunteering. If someone is having problems, I want them to tell me about it. Our work is as much about preventing crime as it is about helping those who have been in trouble."

The numbers back him up. Two-thirds of those who were involved in crime have stopped offending since coming to Unity; 92% of those enrolled in a qualification programme have passed and 61% have gone on to further training, work experience or volunteering. And yes, the football also helps; 78 participants are now earning a wage with semi-professional clubs.

Drop in on Unity's HQ – an office space provided by Connexions in the centre of Nottingham – and you'll find a cross section from across the three estates all looking out for one another. Everyone from 25-year-old Tyeisse, who joined the programme three years ago after coming out of prison, to 19-year-old Chloe, whose personal life is still tricky, to 12-year-old AJ, who has been in trouble at school for bunking off.

But Unity is now a victim of its own success. It has done more than any other organisation to reduce gang culture in the city, but it just doesn't have enough mentors to keep proper tabs on everyone and to intervene if things look like they are going pear-shaped. "We desperately need more money to train people," Morris says. The kids put it somewhat differently. They say: "We need more Morrises. He has been like a father to us." One even calls him his fairy godfather. Though I doubt he says that to his face.

Click here to donate to the Guardian's Christmas charity appeal, changing young lives in the UK

• This article was amended on 17 December 2010 to remove a repeat of the sentence: Two-thirds of those who were involved in crime have stopped offending since coming to Unity.