When he was 15 years old Danny Boyle pretended to be older so he could sneak in to see Stanley Kubrick's A Clockwork Orange.

This would have been in his native Lancashire in the early 1970s, when films for adults still got X ratings, and before Kubrick withdrew it from circulation following the controversy over the sex and violence (and sexual violence) the film centred around.

Boyle went with his mate. He had to buy the tickets because his friend looked much younger than he did. The two of them disappeared into the darkness of the cinema and sat down to watch the film. And that's when things got real horror-show.

If this interview were a film the camera would start tracking in on the teenage Boyle, getting closer and closer, the light from the screen washing over him, closer and closer, focusing in on the future director as his reaction plays out on his face.

"I was really shocked," he might say in voiceover as we move to black through the pupil of his eye. That at least is what he says some 40 years later as the two of us sit in a plush hotel room in central London, recalling a film that made a huge impact on him. "It wasn't the sex. I was trying to see sex films at the time because as a young man you're trying to seek out what you can find. It wasn't as readily available as it is now. But I was really shocked by the film. By the daring of it." Shocked but also rather thrilled. That's what we would have seen in his face if we'd been making a film. Shock and awe.

And it turns out the teenager is father to the man. "Personally that's what I will always go for," he tells me as we discuss sex scenes, screen violence and the genius of James McAvoy on a Tuesday morning over Danish pastries and coffee. Boyle loves watching films that are, in his words, "morally indulgent, I guess - or immorally indulgent. I don't quite know what's the right expression. I love that adult nature of filmmaking."

Yes, just to be clear, this is the same Danny Boyle you're thinking of. The maker of feelgood, fist-pumping movies such as Slumdog Millionaire and 127 Hours. The man who got the Queen to act with James Bond, who made many of us suddenly realise how proud we are to be British during last year's Olympic opening ceremony then made some of us even prouder when he turned down the subsequent knighthood offer. That Danny Boyle.

The Danny Boyle whose new film Trance is an adult film in every sense. Starring McAvoy, Rosario Dawson and Vincent Cassel, it's a movie about art theft, art history, hypnotherapy and gangsterism. It's also a twisty, playful and very grown-up movie, full of extreme violence, brazen sexuality and, best of all, images that will sear themselves on to your retina. I quite liked it. But then I guess I like "morally indulgent" movies too.

Boyle does recognise that Trance isn't a cosy, upbeat film. "It isn't a natural redemptive movie like the two most recent ones. But I blame the Olympics for quite how dark it is. It's the mad, evil twin cousin. It's the relative you don't want to know."

He says he was warned not to do the Olympics in isolation because it would drive him mad, so to keep his sanity he decided to make a movie about insanity and amnesia and unknown mental states. The result strikes a very different note from Slumdog or the Olympic ceremony.

"It's a worry," Boyle admits. "You don't want people walking into the movie thinking it's going to be like the opening ceremony, or there will be some unpleasant bits like in Slumdog but then there will be a dance.

"But what can you do? You cannot always occupy that place they put you in with something like the Olympics ceremony. You're on a bit of a pedestal, to be honest, if it went well. You cannot be in that place when you're making films.

"I remember when we made Trainspotting initially it was abhorred by those who'd seen it. People thought we were disgraceful for making a film about drugs that was so much fun. But it found its place."

Like Boyle himself of course. The son of a Lancashire boiler stoker, his film career has been a rollercoaster ride. Up with Shallow Grave and Trainspotting, the films he made with writer John Hodge, producer Andrew MacDonald and actor Ewan McGregor, down with A Life Less Ordinary and the McGregor-less The Beach – though he'll always tell you the latter made a lot of money – up again with his zombie flick 28 Days Later before everyone ignored his most personal film Millions. Then Slumdog Millionaire wasn't even going to get a cinema release before it went over huge, making millions and winning Oscars. Then came the Olympic gig.

It is just after 10 in the morning. Boyle has recently returned from the United States where Trance was receiving its American premiere (and where, I'll learn later, tabloid gossip is suggesting that he and Trance's lead actor Rosario Dawson are no longer an item). But Boyle doesn't do jetlag. He comes in, sits down and starts talking in fast-forward, pausing only slightly to cram two or three Danish pastries into his mouth between words. His conversation moves at the same speed as his movies.

On the plane down from Edinburgh, I tell him, I read a piece written by a soldier, a veteran of the Iraq war, who talked of being a witness to war. The phrase the soldier used for the compulsive nature of that witness – the need to look at the damage done – was "lust of the eye", a Biblical quotation that strikes me as hugely appropriate to Boyle's films. He thinks so too. "That's very good. I'll steal that. You set up a film like this and there are two ways you could do it. You could go absolute social realism and you go, 'What kind of flat can this character afford? Let's see where hypnotherapists really live.' That's one option and nothing wrong with that.

"Or you want the film to be a seduction. All the films we do, they're all seductions, really. Trainspotting. Ridiculous use of grime in a way that's actually a seduction.

"You can truly appal people with film and repel them so they stay repelled. Some people want to do that. Part of our bargain is to seduce you into the movie and to use the glamour and that shiny appeal of movies to bring you in, and then hopefully there's other stuff there for you. Part of that is the lust of the eye."

That does seem to sum up the appeal of his films. Maybe this is as good as any time to talk about sex, then, Danny. Years ago I remember reading Steven Soderbergh's diary of the making of his first film, Sex, Lies And Videotape. In it, the director admitted he was too embarrassed to ask actor Laura San Giacomo to take off her clothes for a sex scene. That always seemed entirely reasonable to me. But if you watch Trance there's a scene where you know that Boyle has asked his female lead to do more than just take her clothes off (that's as near to a spoiler as I'm going to give).

How do you even begin that talk about such things, I ask him. "You have to have these intimate conversations with all of them. They have to tell you - it's not true on this one - but at some point they've got to go, 'I've agreed to show my bits but I've got to tell him that if he does show them there's this bit that people might find a bit funny.' And the more honest you are about it the better.

"I remember doing it with Kelly Macdonald on Trainspotting and she was brilliant. She had never acted before, never mind taking her kit off in front of a camera. I said, 'You're just going to have to do it and I'll make sure nobody is messing about and it'll be over very, very quickly.'

"Rosario was amazing. She accepted it was unchangeable because of the plot points and she just got on with it really."

You didn't offer to take your own clothes off in sympathy. "No, I didn't volunteer. I've done it in the theatre a few times actually."

My, we seem to be a long way from the Olympic Stadium here, aren't we? Let's backtrack to last summer. The first great thing about the ceremony Boyle and his team gave us was the realisation that the whole thing wouldn't be an unmitigated disaster. "We had these dress rehearsals on the Monday and the Wednesday and there were a number of people who were in the stadium who hadn't seen it – special police for the Queen – and these people came up and you could see the look in their eye was relief. 'It's not terrible.' You could read it."

The second great thing was that, despite all the fuss about the deployment of surface-to-air missiles – something that almost made Boyle walk away – the involvement of Dow Chemicals, the company behind the Bhopal disaster, and the worries about infrastructure, on the night we were presented with a vision of a Britain that many of us could buy into. For three or four hours we found ourselves in a country most of us would want to belong to, one far removed from Little England and its Tory MPs. A Britain of industrial and digital innovation and of progressive politics. And pop music. A Britain that could encompass both Doreen Lawrence and David Bowie.

Or, as the Tory MP Aiden Burley tweeted on the night, "leftie multicultural crap".

"When people accuse you of being political they assume you just walk in with your political baggage or your beliefs and go boom," Boyle says. "If it's going to be any good you have to discover it as you go along. You literally have to leave yourself open to discover.

"And I did discover – as I think a lot of people did in watching it – a kind of pride in what we represent as a country. I've been lucky to have worked in all parts of it. I went to college in Wales. I worked in BBC Northern Ireland for four years and obviously I've worked in Scotland, much to my benefit, hugely to my benefit. So I was well placed to do the British version of this. And finding a pride in the fact we are, despite what we naturally say most of the time, a beacon, this place, for people to come and be themselves. They can be what they want to be. We are a modern progressive nation and we should keep progressing."

Well, perhaps. Then again some of us might decide we want to try it on our own come next year. "Scotland will make its decision and either way the rest of us will benefit. There's a bond. All my family's from Ireland. We're not politically connected to Ireland yet we're bonded together and always will be."

He certainly is. He tells me a story about his first film, Shallow Grave, set in Edinburgh, the movie that made a star of Ewan McGregor. "It was released in London and Scotland before it opened up nationwide and I remember they rang up on the Friday on the day of opening. They said, 'There's four people at the cinema in Hamilton and that means it's a hit because there's normally one or two.'"

That connection continues. Along with a couple of period movies, he's talking about making a sequel to Trainspotting. John Hodge, who wrote the scripts for Shallow Grave, Trainspotting itself and Trance, is working on a script. I wonder, though, why Boyle wants to revisit his past glories. Isn't it a case of been there, done that? Why go back? "Oh, because of the central premise. It's not a cash-in, it's not a tease - it's that Whatever Happened To The Likely Lads idea. It's that fascination that you take somebody you know – and it's amazing the way the film, those actors and the characters they played, have remained in the consciousness – and you bypass a generation and ask: what has happened to them? Have they stayed in the same town? Have they fled? Do they return? What have they done with their lives? Have they married? Have they loved? Have they become a farmer?

"I'm not saying it will work, because you never know that. But as a premise you just think, 'Yeah, I'll go and see that.' I would be interested in seeing what happened to Renton and Spud and Sickboy and Begbie. I don't know whether we will get them all because everyone will have that quality barrier they won't want to damage because of the quality and reputation of the original and their performances. They'll not want to go back to it if it's not good enough, but hopefully it will work."

What ties all this – the darkness, the films, the hope, the passion – together is the thing that is at the heart of the man. An optimism. He thinks energy is his USP. I think that's part of him but really the key is his decency.

"It's to do with - a kind of naivety," he suggests, "a kind of belief that we can be better people. We can always seek to improve ourselves. The films do often have a cynical humour, but that's a mask because I do believe in the best of people."

Danny Boyle is 56. The children he had with his former partner, casting director Gail Stevens, are all grown up and if the gossip mags are to be believed he has time on his hands now. He's not likely to stop making movies soon. "You keep going as long as you can because eventually you declare a stop, like Soderbergh's done. Or, more likely, the industry declares a stop, says, 'That's enough of that, thank you.' Not even thank you, actually: 'Get out of the way.'"

But nobody has said that yet. Thankfully. Because Trance is great. Go see it. It's been made by a man who clearly loves movies. But then he always did. Fade to black. n

Trance (15) is in cinemas now.