Engaging real people in dramatic theatre projects is nothing new for Owen Sheers.

His The Passion, in Port Talbot last Easter, spanned three days and featured thousands of members of the community of the peripheral South Wales town.

Members of his latest cast had to overcome pain and injuries, physical and psychological, to participate in the hit play The Two Worlds of Charlie F. The play features real-life stories of conflict and recovery, acted out partly by injured and sick personnel on a unique placement with the theatre company Bravo 22. It was a success in London's West End in January and opens tomorrow for a four-day run at Edinburgh's Pleasance Grand.

The production was born out of a collaborative project between The Theatre Royal Haymarket Masterclass Trust, The Royal British Legion, Poppyscotland and Defence Recovery Capability, with the charities backing the idea of using a theatrical learning environment to aid recovery, build new skills and offer opportunities to those members of the Armed Forces to ease the transition into civilian life.

Written by Sheers, who wrote The Passion for National Theatre Wales, The Two Worlds of Charlie F is a soldier's view of service, injury and recovery. Moving from the war in Afghanistan it encompasses a dream world of morphine-induced hallucinations in the physio rooms of the UK's leading forces rehabilitation centre, Headley Court in Surrey, and explores the consequences of injury. It aims to show audiences that soldiers face a new battle to survive once they return home.

From the amputee who ends up phoning round pubs trying to find his missing leg to the character editing a late-soldier's tapes home for the soldier's mum because they have episodes of him having sex in them, it's an unflinching look at the camaraderie of the squaddie and the reality of life in and after the forces. In another scene a single amputee compares his stump to those of his friend, a double amputee, and concludes that his "looks like a ******* arse".

Taken from the experiences of the service personnel involved, it is billed as darkly comic, authentic and uplifting – with the added edge that it is performed by those who were there. Sheers says he became interested in the themes before being approached about the project. "Three or four years ago I did work in a prison and was shocked at the number of ex-servicemen I met there," he says. "I realised there can be a real lack of support for people in that situation and wrote a couple of plays set in World War Two about moving between the two worlds of battle and civilian life so I was already moving towards this territory when I met Alice Driver, creative producer of Masterclass Theatre.

"When I wrote The Passion I married the classic story with stories from Port Talbot, the town where it was set, and Alice wanted me to take the same approach. I interviewed over 30 soldiers and spoke to characters who really were heroic and spoke candidly about enjoying being in battle. I also spoke to some who enjoyed killing and were racist but I think it's important to recognise that is reality and in every situation you'll get a range of characters. Some of the squaddies are recruited from difficult situations and backgrounds, with dysfunctional families and a lot of unemployment."

Driver's interest in the subject was also inspired by her own experiences. "This started 15 months ago as an idea inspired by the bravery of a wounded soldier I met in Queen Elizabeth Hospital in Birmingham," she says. "The Bravo 22 Company was born out of this meeting and at its heart was the recovery of wounded service personnel. By being part of this process they would not only immerse themselves in a new industry but benefit from the effects of this theatre model – increased confidence, self-awareness and ultimately allowing them to step away from their injury."

The production received five-star reviews and full-house standing ovations from a star-studded audience when it debuted for two performances at The Theatre Royal Haymarket.

Corporal Lee Millar (25) from Hawick is in the Queens Royal Hussars and was one of the original members of the cast. This was his first experience in drama. "I was deployed to Iraq twice so have some experience but I was fortunate in that I was never wounded," he says. "I really like the whole concept of soldiers telling their own story in a way which shows what goes on behind the scenes. It's not all about war and I think that's important. Some of the scenes involving family and friends are very emotional and that's all true to life."

He has admiration for the people he worked with who suffered physical or psychological injury, pointing out that seeing them at work illustrates the fact that this story is not over. "They were pushing themselves through injury and medication to be part of this. The play is telling a story but it's one that goes on and on and I think it's good to get people to realise that."

Private Andrew Wright (19) from Musselburgh served with 51st Scottish Brigade and is in the current production. He has been in the army for two years and was diagnosed with an unspecified infection which resulted in benign tumours throughout his body. He hopes being involved in Bravo 22 will lead to a life within the performing arts after he is discharged from the services but at the moment he is glad to have the opportunity to be part of the process.

"I have found it life-changing," he explains. "The show is about why we joined the army and how we got to where we are today. There are times when my illness leaves me tired, sick and in pain but there are others in the cast much worse off than me whose conditions are a result of fighting for their country.

"I'd like to carry on acting but even if that doesn't work out it will be great to put on my CV and it's given me confidence and helped my self-esteem. It will be strange to have family and friends in the audience in Edinburgh but I'm looking forward to it – my mum has never heard me sing so this will be a bit of a shock for her."

Sheers hopes the production will be a shock all round. "We need to present the realities of war and conflict on the stage to a society one step removed. The play deals with what happens when they come back and try to adjust to life with physical and psychological injuries and I was excited and terrified about putting service personnel on the stage, but the response from audiences make it clear this was the right way to do it."