When playwright DC Jackson asked David Ireland what might be the Belfast-born actor and playwright's ideal part, for a man who had nominally quit the stage to concentrate on writing it was a no-brainer.

"I said I'd love to play a psychopathic loyalist gunman," Ireland remembers, "because it seemed that I only ever got to play losers."

Ireland's declaration clearly lodged inside Jackson's pop-culture infested brain just as a bullet might. The result is Kill Johnny Glendenning, Jackson's scurrilous comedy which looks at the celebrity status of an imaginary set of Glasgow hard-men who live the high life while make-believing they're in a gangster film.

Ireland plays the title character in a play that opens the Royal Lyceum Theatre, Edinburgh's autumn season with what one suspects will be a bang before transferring to the Citizens in Glasgow. An Ulster gunman and self-publicist extraordinaire, Johnny is headed for the mother of all showdowns with his nemesis in an Ayrshire farmhouse.

"It's about me," Ireland laughs, before correcting himself. "It's about Johnny Glendenning, who is very funny, very articulate, and has a very clever turn of phrase, but he's also a psychopath who enjoys killing people. He's also a celebrity, is revered by young hoods, and has had 17 books written about him. He misses the old days of the Troubles and the peace process, and he doesn't really enjoy living in Scotland and working with all these Glasgow gangsters. He romanticises the past when he hung out with Tony Blair, Peter Mandelson and Mo Mowlam. Although he's not really based on anyone, there's a bit of Travis Bickle from Taxi Driver in there, and I think all the characters in the play fancy themselves as being characters in a Tarantino movie."

Extreme comedy becomes Ireland. This is something he recently proved with his tellingly titled play for this year's Edinburgh Festival Fringe, I Promise You Sex And Violence. As produced by the Newcastle-based Northern Stage company, Ireland's predictably potty-mouthed three-way split between a racist, a homophobe and a misogynist received something of a mixed critical reaction. Yet, in its wilful sense of provocation, the script resembled a comedic ruck between Martin McDonagh and a young Sam Shepard.

"I'm really proud of the play," Ireland says. "I called it I Promise You Sex And Violence so people who don't like seeing sex, violence and swearing on stage won't go and see it. I had a play on that was originally done in Dublin called Half A Glass Of Water, which also played in Londonderry as part of European Capital of Culture. It didn't shock people so much in Dublin, but then really shocked people in Londonderry, and I think with it having such an innocuous title I was probably asking for it. Then I realised plays like mine have really obvious titles, so maybe calling a play I Promise You Sex And Violence worked.

"I suppose a lot of my plays are violent or extreme, but I don't intend it that way. That's just the way they come out. I suppose a lot of the time I'm writing about Belfast, which historically has been a violent and extreme place. It's interesting, because when I was writing I Promise You Sex And Violence, the characters talked like they were from Belfast, and had the attitude of people from Belfast, but none of them actually were. I expected people to find it extreme, but I also expected them to find it funny, which I don't think was necessarily the case."

If I Promise You Sex And Violence is typical of Ireland's oeuvre as a writer, it was as an actor he came to prominence since he trained at RSAMD - now the Royal Conservatoire Scotland - in Glasgow. Ireland had attended youth theatre in Belfast, and had wanted to be an actor having feasted on film culture.

"I grew up wanting to be Jack Nicholson," he says, "but it never really worked out."

Straight out of drama school, Ireland found himself understudying David Tennant in a production of King Lear at the Royal Exchange, Manchester, featuring Tom Courtney in the title role. After two years in the doldrums, Ireland was seen for Decky Does A Bronco, Douglas Maxwell's swing-park tragedy produced by site-specific auteurs, Grid Iron. Ireland played the lead role in what went on to become a smash hit that toured extensively. For a while on the back of Decky, Ireland didn't stop working, at the Royal Shakespeare Company, the Traverse and the Citizens.

After appearing in another Douglas Maxwell play, If Destroyed True, at Dundee Rep, acting work dried up, and Ireland turned to writing. His first play performed was What The Animals Say, which was produced at Oran Mor in Glasgow in 2009 as part of the A Play, A Pie and A Pint lunchtime theatre. Since then, Ireland has written plays for companies such as Tinderbox and Ransom in Belfast, as well as Oran Mor. He was playwright-in-residence at the Lyric Theatre, Belfast.

"I got into a situation where the only things I had time to do in between writing commissions were small parts on TV," he says, "and then people stopped asking me to audition for theatre. Then people in theatre saw me getting these parts and started asking me again.

"I think temperamentally I'm a writer, but you get an adrenalin rush from acting that you don't get from writing. I think I'm a better writer than an actor, but with Kill Johnny Glendenning, I suspect playing a funny psychopath might be well within my range."

Kill Johnny Glendenning, Royal Lyceum Theatre, Edinburgh, September 17-October 11 : Citizens Theatre, Glasgow, October 22-November 8.