Smile, so they say, and the whole world smiles with you. Victor Hugo's writing has already thrown up a mega-musical. The Grinning Man could add a cult classic. Dark and stylish, it has the best British score in years.

Adapted from Hugo's labyrinthine 1869 satire The Man Who Laughs, set in Restoration England, The Grinning Man is a folktale treatise on the human smile. Director Tom Morris and his team – writer Carl Grose and composers Tim Phillips and Marc Teitler have whittled Hugo's story into an expansive, macabre fairytale, nominally set in ye olde Bristol, that turns the monstrous Grinpayne into a messianic figure: the smile that saves us all.

Mutilated as a child, the orphaned Grinpayne (Louis Maskell) is scarred with a terrible smile that he hides beneath a bloodied bandage. It's revealed at the climax of a freakish sideshow, and it's as fixating as it is frightening: a zipper of teeth and tendons. It's as if his skull had eaten its way out of his face.

However, in a miserable and austere kingdom, where laughter is callous and cruel and even the king's clown Barkilphedro (Julian Bleach) can only raise a snarl, Grinpayne's expression has an ecstatic effect on anyone who sees it. The cackle carved into his face proves infectious.

Though Grose has cleared a path through, the plot remains a three-hour long thicket – a fusion of fairytales. It looks back into Grinpayne's past, seeking the source of that scar, as a rave-cultural revolution surges towards the cavalier and corrupt royal family: a stony-faced queen (Patrycja Kujawska) and her incestuous, opulent siblings (Gloria Onitiri and Stuart Neal). Seeing Grinpayne they find true joy – and so seek to possess it for themselves. He, meanwhile, finds it only in love; the blind Dea (Audrey Brisson) being immune to his looks.

Grose's script is crowned by an extraordinary score; the most ambitious and intricate British musical since London Road. Philips and Teitler's songs duck in and out of each other, rippling with echoes and syncopation. More than once, refrains slot together to form jigsaw-like medleys, whereby each new element elevates the rest. They've hit on a singular sound too, helped by Tom Deering's harps-and-synths orchestrations. It slides from innocence to rancour; the twinklings of a childhood music box to the wheezing of a rusty street organ. Time and again, music makes the meaning. Life scars and sours us all.

It's also riddled with earworms. "Stars in the Sky" is a soothing protection song, while the needling "Labyrinth" conveys Grinpayne's agonies. "Never Seen a Face Like This" spins lyrics at a lick to capture the sensation of a joy that bubbles up until your whole body beams.

Staged as a carnivalesque sideshow on Jon Bausor's Cheshire Cat grin of a stage, Morris's production makes up for rough edges with a freewheeling panache. It mixes enchanting visuals (not least Finn Caldwell and Toby Olié's puppets) with a sprinkling of silliness and self-awareness. Bleach, Shockheaded Peter's old frontman, is an inspired choice of host. His Barkilphredo becomes a scorched jester with a souring voice.

It has a second star: the gently charismatic Louis Maskell, set apart by his voice as much as his smile. His Grinpayne is many things: the only true smile amongst fakers and a man who wears his pain on the outside. He's a manifestation of the way life marks us as innocence rubs off; the agonies that accompany its delights.

There's much more besides. The Grinning Man picks at the hedonism and appearances of cavalier lives, the contagion of joy and the oddity of theatre itself, with its tragedies and clowns. It's a heady mix: political, playful and profound. All smiles.

The Grinning Man runs at Bristol Old Vic until 13 November.