"Several of me are offended by your remarks."

“Split,” a return to form for once-beloved writer-director M. Night Shyamalan, is a psychological thriller disguised as a kidnapped-girls horror movie. After stifling himself to make the found-footage exercise “The Visit,” Shyamalan’s distinct style — stiff, formal, sometimes ludicrous and operatic, pockmarked with comedy — is back in full bloom with “Split.” That makes it hard to dismiss, even if you can’t quite get on board with everything it does.

It’s led by James McAvoy, living an actor’s dream as Kevin, a well-organized, obsessive-compulsive Philadelphia man with at least 23 different personalities, each with his or her own voice, accent, and mannerisms. The main one, called Barry, is a nervous, talkative Long Islander who’s been making progress with his (their?) psychiatrist, Dr. Fletcher (Betty Buckley), in treating his dissociative identity disorder (aka multiple personality disorder). But an unhinged personality, Dennis, has been taking control of Kevin lately, and it is he who abducted three teenage girls — Casey (Anya Taylor-Joy), Claire (Haley Lu Richardson), and Hannah (Kim Director) — and locked them in a basement in preparation for something very sinister and very specific.

Following “Psycho’s” lead, “Split” begins by focusing on the victims and their escape efforts before revealing itself to be more about Barry’s story than theirs. But even when it’s “theirs,” it’s really only Casey’s, the misfit girl whose flashbacks to deer hunting with her father and uncle show how she came to be the resourceful survivor she is now. A traumatic past is something she has in common with her abductor, whose personalities were each created out of necessity as a coping mechanism for some particular trauma in the man’s childhood. McAvoy is gleefully serious about all of this, committing himself fully to each persona — including a 9-year-old boy and a prim woman named Miss Patricia — and slipping between them with scenery-chewing bravura.

Of course, you can’t look at this as a story about dissociative identity disorder per se. Shyamalan certainly doesn’t. He merely uses that real-world mental illness as the jumping-off point for fiction — science fiction, technically. His ideas about how the human psyche works are fascinating, with mind-over-matter questions like how one personality can be diabetic while the others aren’t. Can truly believing something cause it to become physical reality? “Split” doesn’t pack the punch of Shyamalan’s best movies (those being “The Sixth Sense,” “Unbreakable,” and “Signs”), but it shows that his outré ideas and methods still have currency.

B+ (1 hr., 57 min.; PG-13, a little profanity, disturbing thematic content, and brief violent images.)