He carries multiple harmonicas in his briefcase. He has played with members of the Dave Matthews Band and the Grateful Dead. And he has been known to show up unannounced at bluegrass jamborees around his home state, Virginia, simply looking to jam.

His time in Virginia has left him steeped in the history of bluegrass and old-time music. Hopping up and down the 330-mile Crooked Road that winds through the heart of bluegrass country in Virginia, he has memorized dozens of standards like “Will the Circle Be Unbroken” and “Man of Constant Sorrow,” along with newer songs like “Wagon Wheel.”

“He’s comfortable on stage,” said Woody Crenshaw, the former owner of the Floyd Country Store, about an hour’s drive southwest of Roanoke, Va., where Mr. Kaine has performed numerous times. “He has a feel for the old-time music of these mountains.”

Mr. Kaine has made music an important part of his political life. He has often “sat in” at bluegrass open jam sessions while campaigning and in office. During his Senate campaign in 2012, he held a promotional contest, “Harmonica With Tim,” in which one lucky person would win not just a dinner with Mr. Kaine, but also a one-on-one harmonica lesson. He had a bluegrass band, No Speed Limit, play his inauguration in 2006 (and he hopped onto the stage for a few songs, naturally).

Mr. Kaine first picked up the harmonica around seventh grade, inspired by a friend a year older who had been bringing his harmonica around and belting out some melody lines.

“So one summer I made it my goal that I was going to learn to play the harmonica,” Mr. Kaine said in a 2005 interview.

The teenager would practice at home as much as he could, but given the loud and sometimes discordant sounds that emanate from a beginner’s harmonica, he would save his parents’ ears and sanity and head out of the house to practice.

“The elementary school I attended was about five blocks from my house,” Mr. Kaine said. “So then I would walk up to the playground of this elementary school after dinner, and I would sit on the swings or walk around the playground playing the harmonica until I learned how to play it.”

His skill on the harmonica has allowed him to jam seamlessly with professionals and amateurs, and earn the respect of Virginians, not just as a governor or a senator who has a hobby he likes to use politically, but also as a musician.

“One Sunday I’m there in the circle playing banjo and suddenly TV cameras show up,” said Alan Graf, a lawyer and a musician, who often plays at the Floyd Country Store. “Tim Kaine walks in, and he sits down and someone goes, ‘That’s Senator Tim Kaine,’ and I go, ‘Oh great,’ so much for a relaxed session with cameras beaming at you.”

Mr. Graf was “leading” the song that Mr. Kaine joined in on, which in bluegrass means he can dictate who gets to take a solo during a break.

“And we’re playing, and I notice Tim’s looking at me,” he said. “And I figured it was time for a solo. So I gave him the nod,” he said with a pause, laughing. “Like Hillary.”

Mr. Kaine — who accepted his party’s nomination as Hillary Clinton’s running mate on Wednesday night in a speech before the Democratic convention —- jumped in without missing a beat.

“But he took it, he took it, man,” Mr. Graf said. “He just jumped on it. He was ready to go, and he took a pretty mean harp solo.”

Politicians who also dabble in music are not uncommon; Bill Clinton famously jammed on his saxophone and Gov. Martin O’Malley of Maryland toted his guitar and banjo around the 2016 presidential campaign trail. For those who have the skills, it can be an invaluable way of connecting with voters beyond the handshake and selfie.

“If you show up someplace where people don’t really know you and you can play a tune, even if it’s not a tune they recognize, they think, ‘This guy’s not a politician; he can play music,’ said Al Cross, director of the Institute for Rural Journalism and Community Issues, based at the University of Kentucky.

He added that this helped Mr. Kaine in particular in the Appalachian states like Virginia, where music is as much a part of life as stack cakes, goosefoot and greasy beans.

Mr. Kaine is not just a live performer; he also played on a track with the musician Steve Bassett, turning the basement of the Virginia governor’s mansion into a temporary recording studio for “Election Day,” a song Mr. Bassett wrote about the freedom to vote.

“I took a recorder to the governor’s mansion, and he and his son and I got together and recorded in the basement,” recalled Mr. Bassett, who used nearly all Civil War-era instruments on the record. “He’s a good player.”