His brother and manager, Dick, said that Johnston had probably died overnight. He did not specify the cause.

Johnston had been released from a hospital Tuesday after being treated for kidney issues. “He was still productive, writing songs and drawing, and was just annoyed by his health more than anything,” his brother said. “It was just one thing after another.”

In a career that was filled with stops and starts, Johnston became something of a man-child celebrity of the artistic underground, earning the admiration of rock stars like Kurt Cobain and Tom Waits as well as comparisons to William Blake. His cartoon drawings — rendered in Magic Marker and frequently inspired by characters like Casper the Friendly Ghost — were included in the Whitney Biennial exhibition in 2006 at the Whitney Museum of American Art.

Yet Johnston was dogged by mental health problems that stunted his career and periodically hospitalized him. In recent years he had largely been confined to his family’s home; in 2017, he went on a farewell tour backed by members of the bands Fugazi, Wilco and Built to Spill.

As news of his death spread, Johnston was mourned online by creators across mediums and generations, among them Beck, director Judd Apatow and John Darnielle of the literary-minded indie band the Mountain Goats. Producer Jack Antonoff praised the way Johnston “shared fearlessly.”

Johnston was born on Jan. 22, 1961, in Sacramento, California, the youngest of five children in what he described as a Christian fundamentalist household. At a young age, he moved with his family to West Virginia, but by the early 1980s he had relocated to the underground rock center of Austin, Texas, where he handed out homemade cassettes to friends and customers while working at a McDonald’s. According to Johnston’s website, those tapes were recorded on a $59 Sanyo boombox.

He quickly gained the notice of fellow musicians and the music press with songs, like “Speeding Motorcycle” and “Don’t Play Cards With Satan,” that had a poignant clarity yet showed glimpses of a fractured mind. He became almost as well known for the strange, cartoonish art that decorated the tapes. One, “Hi, How Are You,” featured a froglike alien, and the image became his signature.

With a boyish voice and a gift for pure melody — his biggest inspiration was the Beatles — Johnston sang candidly and sometimes disturbingly about his demons. “Despair came knocking at my door, and I let her in for a while,” he sang on “Despair Came Knocking,” from “Hi, How Are You.” “She sat on the couch and began smoking. She said nothing.”

Climbing the rungs of the indie-rock world, Johnston was featured on MTV in 1985, and three years later came to New York, where he mixed with the bands Sonic Youth and Galaxie 500 — but ended up in Bellevue Hospital after he assaulted Sonic Youth’s drummer, Steve Shelley. (Upon his release, Johnston went straight to CBGB to perform.)

At the same time, Johnston’s songs were becoming indie-rock standards. “Speeding Motorcycle,” capturing the thrill and fear of passion — “Speeding motorcycle, don’t you drive recklessly/Speeding motorcycle of my heart” — was covered by Yo La Tengo, the Pastels, Mary Lou Lord and others.

In 1991, Johnston made a joint album with Jad Fair of the band Half Japanese, who had cultivated a similar reputation as an eccentric. But by comparison, the rock guide Trouser Press noted, Fair “seems about as offbeat as an insurance salesman,” as Johnston muttered “Poor you, no one understands you” in a warped, ghostlike voice.

In the music industry’s alternative-rock gold rush of the 1990s, Johnston was briefly signed to Atlantic Records. But his sole major-label album, “Fun,” released in 1994, was a flop, and the label soon dropped him.

As Johnston’s mental problems mounted — he said he suffered from manic depression — he largely withdrew from performing and remained at his family home.

In addition to his brother, he is survived by three sisters, Margy Johnston, Sally Reid and Cindy Brewer.

In the 2000s, even as Daniel Johnston seemed to disappear from public life, his reputation as a singular artist was growing. On a 2004 compilation album, “The Late Great Daniel Johnston: Discovered Covered,” his songs were performed by Waits, TV on the Radio and Death Cab for Cutie. The next year, Jeff Feuerzeig’s film “The Devil and Daniel Johnston” won the documentary directing award at the Sundance Film Festival.

But when Johnston was chosen for the 2006 edition of the prestigious Whitney Biennial, he was completely unaware of his selection. When asked whether he would travel to New York to see his work in the show, he told The New York Times: “I’m not in any condition to go overseas. It would wipe me out.”

In recent years, Johnston made sporadic attempts to make another album, which he wanted to call “If.” But it was never completed; according to an account in New York magazine, the producer on the project, Brian Beattie, clashed with Dick Johnston and others who were involved in Daniel Johnston’s management.

Still, Johnston remained dedicated to his art, planning his 2017 tour despite failing health.

“I can’t stop writing,” he said in an interview with The Times. “If I did stop, there could be nothing. Maybe everything would stop. So I won’t stop. I’ve got to keep it going.”

This article originally appeared in

.