William Jackson Harper is moving on from The Good Place, but you wouldn’t exactly say he’s going to a better place. Best known for his character in the hit afterlife sitcom – Chidi Anagonye, the charmingly awkward ethics professor who’s more comfortable discussing the finer points of moral philosophy than actually acting on them – his next career move is far more sinister. Harper is starring in Ari Aster’s new film, Midsommar, where he is trapped in the middle of the countryside for an onslaught of unsavoury pagan rituals.

By coincidence, the same day we discuss Harper’s new movie, it is announced that the fourth season of The Good Place, which he is now shooting, will be the last. “It’s a gut punch but it’s also the right move. It’s really important to maintain artistic integrity,” says Harper down the phone, with a hint of Chidi-style earnestness.

Over the course of The Good Place so far, Chidi has died and been damned to hell multiple times, had his mind blown by witnessing a trillion different realities in the blink of an eye, and eaten his body weight in chilli mixed with marshmallow, all of which might be preferable to Harper’s situation in Midsommar. The follow-up to Aster’s breakout/freakout horror hit Hereditary, Midsommar brings a group of Americans to remotest rural Sweden – a land where everything is unsettlingly bright and white, from the perpetual daylight to the fair-haired villagers and the folksy dress code.

“I play a student of northern European summer solstice traditions,” Harper explains. “I’m a real nut for odd pagan rituals and this is a great opportunity to go and observe one, so for me, this is like the trip of a lifetime.” The final trip of his lifetime, perhaps? Judging by the trailer, things do not go well for him – what with the hallucinogens, the disembowelled bear, the hideously disfigured girl, and a clip of his character collapsing to the floor – but, says Harper, the less you know going in, the better. “It’s not a fun romp in the forest, necessarily.”

Ari Aster has already cited film precedents for Midsommar, including Black Narcissus and Roman Polanski’s Macbeth and Tess, but the most obvious comparison point is that foundation stone of folk-horror, The Wicker Man. Harper describes the film as one of his all-time favourites (the 1973 original, that is, not the Nicolas Cage remake). “I love the idea of an isolated society that has so much joy at the centre of it, even with the brutality that exists in that world. It’s so clearly a microcosm for humanity. That was one of the things we really latched onto here.”

From Harper’s perspective, as the only American and just about the only person of colour in the cast, there’s also a hint of Get Out to proceedings. Midsommar was actually shot in Hungary, not Sweden, with a primarily European cast and crew. “I was completely out of my comfort zone for the entire two months that we were working,” he says. “I think if it had been somewhere in England, even though the cultures are drastically different, at least the shared language would have made me feel a little less isolated.” They weren’t actually in the middle of nowhere, but the purpose-built set was uncannily immersive. “It was very easy at times to let yourself be lost in this world that was constructed,” he says. “In some ways it made it a little bit easier to just go in and give yourself to the experience.”

Has he ever attended a real pagan ritual? “No!” he laughs, “but I did grow up super-religious, so I had an intense fear of it for a very long time. So going into this role was maybe … I wouldn’t say it was a question of fear, but it was giving myself over to the questions that one would have if they were more open to these ideas that weren’t steeped in a Judeo-Christian upbringing.”

As he expands with some authority on the nature of religion and belief, it is again difficult not to hear the Chidi in him. Midsommar is certainly a departure from The Good Place, but it seems as if the 39-year-old Harper is again playing a studious, academic type. “An academic, yes, but a very different guy. I feel like, in general, I have played in the past, sort of … smart characters. That’s sort of my wheelhouse, the thing that’s easiest for me to go to.”

The Good Place. Photograph: NBC/Getty Images

When you think about it, it’s a wheelhouse African-American actors have rarely been allowed to go to. The Good Place wears its diversity as lightly as its philosophy, but half the principal characters are non-white, and Chidi, especially, is as un-stereotypical a black male character as mainstream TV has ever given us.

Before The Good Place came along, Harper was considering giving up acting. Raised in Dallas, he studied in Santa Fe then came to New York City 15 years ago to build a career, principally in theatre. He was working all the time but was struggling to make ends meet. “It got to the point where I was on stage and thinking about: ‘OK, I’m getting my last pay check on Thursday. Do I have enough to get to the end of the month?’”

He went into the audition for The Good Place with no knowledge of what the show was about (they were given dummy scripts) and no expectation of landing the role, he says. “I hadn’t really seen guys like me playing that kind of part in a network sitcom. So I was like: ‘Well, I’ll have fun auditioning but I don’t think they’ll go with me.’” What does “guys like me” mean? “Well … I was imagining a far more mainstream, good-looking dude. The character was written as a black man, so I was like: ‘OK, I fit there,’ but there are dudes that just feel, in my opinion, more … camera-ready.”

Stacked actor: swole Harper in The Good Place. Photograph: NBC

The modesty is genuine, if misplaced. Audiences certainly found Harper camera-ready in season three, episode five of The Good Place when, in the aftermath of yet another complete collapse of his existential worldview (if you haven’t seen the show, that’s kind of a recurring feature), Chidi removes his shirt to reveal a remarkably buff, gym-toned torso. He may play a bespectacled square, but the man is ripped. Needless to say, much of the internet went crazy. One fan even published an essay titled “A Moral Defense of Chidi’s Swoleness”, which asked: “Is it ethical to be that jacked?” (Plato would say yes; Kant would be doubtful, apparently.) “I’ve taken my shirt off in front of women I’ve tried to date and seen them flinch,” laughs Harper, “so I certainly wasn’t expecting any sort of positive reaction.”

He’ll be sad to say goodbye to Chidi after four years, he says, but he’s looking forward to moving on. Having survived the ravages of pagan Sweden (or not), he’s up next in Todd Haynes’s new environmental-themed drama Dry Run, opposite Mark Ruffalo and Anne Hathaway. Even by his own standards perhaps Harper can finally describe himself as “camera-ready”. But all that time quoting philosophers and explaining ethical dilemmas in The Good Place has been an education for him in life as well as career.

“I’m more conscious of putting as much objective good in the world as I can,” he says. “I’m in a very privileged position right now where my needs are met, and I can look beyond my little circle of what I have to do to get through the next month to what can I do to be a better person. This show awakened the responsibility I think I have to other people, and I think that’s something a lot of people are latching onto, especially given where we are in the world right now, where it seems like everyone’s out for themselves.”

At the time of our interview, Harper has yet to see Midsommar, but Bloody Disgusting described it as “a mind-fuck of the highest order,” and, to Harper’s pride, Jordan Peele described the movie as an “ascension of horror”. Harper couldn’t be happier: “No matter what is said about this movie by anyone else, that’s what I’m taking away.”

Midsommar is in cinemas now