In 1996, in the liner notes to Michael McDermott’s self-titled album, novelist and rock fan Stephen King wrote about the first time he encountered the music of the singer and songwriter:

“Not since I first heard Bruce Springsteen singing ‘Rosalita’ had I heard someone who excited me so much as a listener, who turned my dials so high, who just made me feel so … [expletive] happy to have ears.”

The music may have lived up to the rave, and McDermott is even better now — more on that in a minute — but back then, he was making the musical magic despite being in the throes of a deep drug and alcohol addiction. It was a darkness that lasted for two decades, and that resisted even the efforts of his most prominent fan and supporter.

“Stephen King had written me a letter in the early days,” McDermott — now five years sober — says. “He says, ‘Hey, I hear you’re struggling.’ It was an eight-page typed letter. It was beautiful, about how he got clean and sober. … I kept this note with me through the years, even when I was a mess. I’d be in a crack house and I’d break it out and read it to people. …

“And it’s funny, when I finally got sober … I looked at it again and it all rang true now. Then I looked at the date and it said 1995, and I said, ‘I know I’m a slow learner, but it took me this long to listen to this brilliant man?’ ”

In reality, the main impetus for getting sober was his wife, Heather Horton, also a musician, and their daughter, Rain, now 8.

“The looks I’d get from Heather and my daughter, who was 3 or 4 at the time,” McDermott, 49, recalls. “Just to see a little girl look at you like, ‘Who is this guy?’ And passing out at the dinner table. It was bad.”

Following through on an ultimatum from Horton, McDermott finally got sober. But that prospect was terrifying in its own way: “Is it going to affect the way I write, the way I perceive things? How would I perform? Would I still be funny? Would I still be sexy? Would I still seem tough? Those are the edifices we build around us, and we prop them up with booze and blow.”

Judging by the music he has been making, those fears are unfounded. His 2016 album, Willow Springs, and 2017’s Out from Under were the best of his career. (And that’s not counting two terrific albums with his side project, the Westies.)

And now comes Orphans, which consists mostly of songs that didn’t make it onto Willow Springs and Out from Under. These songs are so good, though, that the album not only matches the quality of the previous two but is destined to rank as one of the year’s best.

“They just didn’t seem right at the time. Songs are like that sometimes,” McDermott says about leaving them off the earlier albums.

But when he’d play some of them live, he’d get a good response from audiences, who would ask about them.

“Shows you what little I know,” he says.

The songs offer more prime examples of how McDermott exerts his considerable power. He draws a lot from his own experience, and with unsparing candor. “Let’s make the most of our time in this world we live in,” he urges in the opener “Tell-Tale Heart.” “I’m guided by the darkness that looms when I’m alone,” he confesses on the folk-accented “Black Tree, Blue Sky.” And on the finale, the piano ballad “What If Today Were My Last,” he poses a series of self-referential questions, including: “Was I generous enough with my heart, or did I wear my pride like a mask?”

After a promising start in the early 1990s, including MTV exposure, fame and commercial success never really followed all the critical acclaim for McDermott, who says that contributed to his fall. He’d still like to be bigger — who wouldn’t? — but “If I can play places like the Locks all over the country and fill those places, I’m happy.”

As for his sobriety, he calls it “a total miracle.”

“It’s changed everything, and with that I kind of feel like I’m on borrowed time, making up for lost time. I squandered so much of my life. It’s a cliché, but I’m grateful for every day.”

MUSIC

Michael McDermott

With Dharmasoul, 8 p.m. Thursday, Locks at Sona, 4417 Main St., Manayunk. $18-$25, 484-373-0481, thelocksmusic.com