Musician Marc Pawson, from Port Glasgow, has been volunteering at institutions with the aim of discouraging inmates from reoffending after their release.
Known by his stage name Mpfree, he has been a regular at Polmont Young Offenders Institution where he has led a number of rap workshops with inmates.
Prison bosses welcomed the rapper's input and said it was an important part of the rehabilitation process. Mr Pawson's sessions have been credited with boosting inmates' confidence and helping them break the cycle of criminality into which many are locked.
A spokesman for the Scottish Prison Service said: "A diverse programme of activities is delivered in Polmont to encourage a positive approach to learning and purposeful activity. We wholeheartedly welcome the excellent support that partner agencies and volunteers such as Mpfree provide towards achieving that goal."
The importance of creative arts is often viewed as a major facet in the rehabilitation of prisoners. Campaigners have long argued for such outlets to be made available for inmates, especially those who are nearing their release date.
A spokeswoman for jail reform body the Howard League Scotland said: "Activities such as these may not seem a hard-nosed way of dealing with inmates, but they can be very powerful. We need to find ways of engaging prisoners and getting them to think about their lives after they're released. I think creative projects would be especially effective in a place like Polmont."
Mr Pawson, 31, said: "The key aspects of the project was to highlight the creative potential within inmates and to instil hope in their life chances after leaving custody.
"For many prisoners, the thought of being released is pretty daunting, and some have spoken about the 'trap', or cycle, of reoffending waiting for them when they do get out. Hopefully, the skills and confidence they get from the rap workshops will make them better equipped to help deal with that and help them grasp their second chance."
He said he had witnessed a change in many of those involved.
He added: "I noticed a major change in one youngster at Polmont, who for the first few weeks had yet to leave his cell. But after a few weeks he joined in the writing sessions and by the time it came to perform, he was right up there rapping in front of 80 fellow inmates. His keyworker came up to me and told me how he would never have done anything like that a few months before.
"The guards have also noticed a major change in the overall attitude of some of the prisoners who now have something creative to focus on."
As a product of his rap workshops, Mpfree has released an album called Writers Block, which features contributions from inmates at Polmont.
Robyn Hayes, regimes officer at HMYOI Polmont, said: "Mpfree gave his time to help the young men learn rap and he inspired them to complete their own projects.
"It then dawned on us that we should get this recorded and let the world know people from different backgrounds and life choices can come together and deliver a high-quality and positive album."
One young man involved in the project, who could not be named, added: "Nobody ever thought I had talent, even me. Now, after working with Mpfree I feel I can be anything I want to be, make changes in my life and be the father my kids will be proud of."
Fergus McNeill, professor of criminology and social work at Glasgow University, said: "Song-writing and performance creates opportunities for people to express their humanity and vulnerability, not something imprisonment tends to encourage, and that's critical to addressing conflicts and repairing harm in relationships."
l An English teacher at Holy Cross High School in Hamilton adopted rap to help develop literacy and wordplay with his S2 pupils. Peter Kelly's project has now been taken up by Calderside Academy, in Blantyre, and Carluke High School.