In February, D.C.-based indie soul band Oh He Dead spent a long weekend in a cabin in West Virginia writing songs. The group had recently finished recording a self-titled debut album at Ivakota studio on Capitol Hill but had some new ideas to work on.

Guitarist Alex Salser, 28, started playing a funky riff he’d been noodling on by himself for months. Singer-guitarist Andy Valenti, 32, quickly wrote a hook. Lead singer C.J. Johnson, 23, followed with the verses. Then bassist John Daise, 32, nailed the bridge. An hour later, they had “Lonely Sometimes,” an infectious, groove-based track about yearning for human connection. It was the first time those four all had a hand in composing a song.

“It’s one of our songs where we play and I can definitely feel [the band’s] energy change, like ‘Oh, this is our song,’ ” Johnson says.

In March, the track fully clicked when the group — now with Adam Ashforth, 30, on drums — reconvened at the Lily Pad, a converted barn/studio/practice space in the backyard of Salser’s parents’ Leesburg home. Salser’s dad filmed a live performance of the song to submit to NPR’s annual Tiny Desk Contest that captured the band’s excitement over this new song. After the video was uploaded to YouTube in April, it started racking up views and comments on Reddit. It also caught the eyes of NPR’s editors and WAMU host Kojo Nnamdi, who invited the band onto his show.

Oh He Dead didn’t win the Tiny Desk Contest but it quickly realized it needed to add “Lonely Sometimes” to its debut album, which drops Friday in conjunction with a sold out show at Pearl Street Warehouse. “It’s definitely lit a fire,” Salser says.

There’s an exuberance to “Lonely Sometimes” that makes it come across more like a celebration of loneliness, not a lament. “That song in particular is just so fun and happy,” Valenti says. “That chorus just feels like this joyous lift, and I feel like that represents our band in a lot of ways.”

But getting attention for a song that came together so quickly was hard for Valenti to comprehend. “I sometimes have this impostor syndrome thing [about] that song,” he says. “We’ve been working on other songs like ‘The Situation’ for years and years to try to get to the point where we were doing it justice. This song came together in an hour. Adam was in the band for literally a week when we recorded the Tiny Desk thing. I felt like we were cheating, like I tricked everybody.”

Considering “The Situation” dates from before Oh He Dead existed, you can see where he’s coming from. Johnson started writing that song when she was in high school. In 2015, Claire Newbegin, Johnson’s former teacher at Cesar Chavez on Capitol Hill, sent her friend Valenti a voice memo of Johnson singing “The Situation” to get the pair to work together.

“I heard 10 seconds of her voice and I was blown away,” Valenti says of Johnson’s raspy, soulful style. He agreed to help Johnson, who had been singing Neil Young and Kings of Leon covers at Potbellys around the District, write songs. “We started singing together in the first or second practice and there was a moment where we harmonized and we just looked at each other,” he says. (Newbegin, a law student, is now the band’s manager. Johnson lives in the basement of Newbegin’s Trinidad row home; Valenti lives across the street.)

It wasn’t just a musical connection. “The harmonies were compelling but C.J. and I shared this brotherly/sisterly bond where we’re 10 years apart in age, but mentally we are on the same wavelength,” Valenti says. “C.J.’s taste is really broad and interesting. She grew up on classic rock. When we were trying to write songs, we were speaking the same musical language.”

Initially, they were an acoustic folk duo. When they needed a name, they thought back to a ballad Johnson wrote called “Better Than You,” in which she walks in on her boyfriend cheating on her, so she shoots him. After Valenti heard it, he asked what happened to the guy in the song. “Oh, he dead,” Johnson replied. The phrase became a running joke that soon morphed into a band name.

In 2017, Reston’s Salser joined after his band, Dear Creek, shared a bill with Oh He Dead. Falls Church’s Daise came aboard at the end of 2018 after admiring one of their videos (“I was like, ‘Damn, I want to be in that band,’ and I kept going to their shows,” he says). Ashforth, also of Falls Church, joined between the West Virginia songwriting session and the Tiny Desk Contest recording.

“The Situation” and “Lonely Sometimes” now live together on the album, representing the organic shift from folk duo to soulful, jazzy pop band that’s evident across the record. “We didn’t even talk about it,” Johnson says of the sonic evolution. “I think it was just a matter of us writing songs and being like, ‘I want it to sound like this.’ ”

“Our songs have always been soulful,” Valenti adds. “We played Union Stage earlier this year, and a friend told us that people were grinding in the audience. Hearing that blew my mind because I never thought we’d be that band.”

Oh He Dead is working toward making music everyone’s full-time endeavor. Over the summer, they got a taste of what that might look like when they rented a van for a seven-show East Coast tour they booked themselves. The turnout in cities in which they’d never played, such as Burlington, Vt., was surprisingly strong and the musicians say they came home closer than ever.

“We’re all chasing that feeling to get back out there,” Ashforth says.

“I think we’re getting closer and closer to a place where we can support ourselves via touring,” Valenti adds. “It’s hard to be at a job that’s not doing this full-time right now.”

If you go

Oh He Dead

Friday at 8 p.m. at Pearl Street Warehouse, 33 Pearl St. SW. pearlstreetwarehouse.com. Sold out.

Saturday at 6 p.m. at Apple Carnegie Library, 801 K St. NW. apple.com/retail/carnegielibrary. Free.

Dec. 7 at 9 p.m. at Ottobar, 2549 N. Howard St., Baltimore. theottobar.com. $12-$14.